From 3e0620f83636c7f89964d274d6d7296f2749dfa0 Mon Sep 17 00:00:00 2001 From: pjht Date: Mon, 23 Sep 2024 13:26:04 -0500 Subject: [PATCH] Wake processes started from the initrd --- src/main.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 }