Wake processes started from the initrd
This commit is contained in:
parent
7a1dcd6359
commit
3e0620f836
@ -4,7 +4,7 @@
|
|||||||
use std::ffi::CString;
|
use std::ffi::CString;
|
||||||
use std::fs::File;
|
use std::fs::File;
|
||||||
use std::io::Write;
|
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::loader::Loader;
|
||||||
use std::os::mikros::syscalls::{get_initrd, new_process};
|
use std::os::mikros::syscalls::{get_initrd, new_process};
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
@ -181,5 +181,7 @@ fn run_initrd_proc(initrd: &TarArchiveRef, path: &str) -> u64 {
|
|||||||
.data();
|
.data();
|
||||||
let (space, entry) = Loader::load(proc);
|
let (space, entry) = Loader::load(proc);
|
||||||
let path_arg = CString::new(path).unwrap();
|
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
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user