Merge recent update from ch7 && cargo clippy

This commit is contained in:
Yifan Wu 2022-01-22 12:32:36 -08:00
parent 737340b0a0
commit c9583b0f53
20 changed files with 236 additions and 163 deletions

View file

@ -1,7 +1,6 @@
#![no_std]
#![no_main]
#[macro_use]
extern crate user_lib;
use user_lib::{
@ -14,7 +13,7 @@ use user_lib::{
#[no_mangle]
fn main() -> i32 {
if fork() == 0 {
exec("user_shell\0", &[0 as *const u8]);
exec("user_shell\0", &[core::ptr::null::<u8>()]);
} else {
loop {
let mut exit_code: i32 = 0;
@ -23,11 +22,13 @@ fn main() -> i32 {
yield_();
continue;
}
/*
println!(
"[initproc] Released a zombie process, pid={}, exit_code={}",
pid,
exit_code,
);
*/
}
}
0