diff --git a/src/main.rs b/src/main.rs index ae79f69..95d6da8 100644 --- a/src/main.rs +++ b/src/main.rs @@ -4,7 +4,7 @@ use std::ffi::CString; use std::fs::File; use std::io::Write; -use std::os::mikros::ipc; +use std::os::mikros::{ipc, syscalls}; use std::os::mikros::loader::Loader; use std::os::mikros::syscalls::{get_initrd, new_process}; use std::path::Path; @@ -181,5 +181,7 @@ fn run_initrd_proc(initrd: &TarArchiveRef, path: &str) -> u64 { .data(); let (space, entry) = Loader::load(proc); let path_arg = CString::new(path).unwrap(); - new_process(entry as _, space, &[path_arg.as_bytes_with_nul()]).unwrap() + let pid = new_process(entry as _, space, &[path_arg.as_bytes_with_nul()]).unwrap(); + syscalls::wake_new(pid); + pid }