diff --git a/library/std/src/sys/pal/mikros/process.rs b/library/std/src/sys/pal/mikros/process.rs index 6b253ac3501..d0e4c86868e 100644 --- a/library/std/src/sys/pal/mikros/process.rs +++ b/library/std/src/sys/pal/mikros/process.rs @@ -134,15 +134,13 @@ pub fn spawn( .map(|arg| (0, arg.clone().into_encoded_bytes())) .collect::)>>(); let pid = super::syscalls::new_process(entry as _, space).unwrap(); - if let Some(vfs_pid) = syscalls::try_get_registered(0) { + if let Some(proc_man_pid) = syscalls::try_get_registered(3) { let res: Result<(), Errno> = postcard::from_bytes( - &rpc::send_call(vfs_pid, 2, 4, &postcard::to_allocvec(&(pid, stdio)).unwrap()) + &rpc::send_call(proc_man_pid, 8, 0, &postcard::to_allocvec(&(pid, stdio)).unwrap()) .get_return(), ) .unwrap(); res?; - }; - if let Some(proc_man_pid) = syscalls::try_get_registered(3) { let res: Result<(), Errno> = postcard::from_bytes( &rpc::send_call(proc_man_pid, 8, 2, &postcard::to_allocvec(&(pid, args)).unwrap()) .get_return(), diff --git a/library/std/src/sys/pal/mikros/stdio.rs b/library/std/src/sys/pal/mikros/stdio.rs index 3d941fb5025..a2016e7b4ab 100644 --- a/library/std/src/sys/pal/mikros/stdio.rs +++ b/library/std/src/sys/pal/mikros/stdio.rs @@ -98,14 +98,14 @@ pub fn panic_output() -> Option { } pub fn init() { - let Some(vfs_pid) = syscalls::try_get_registered(0) else { + let Some(proc_man_pid) = syscalls::try_get_registered(3) else { STDIN_FD.get_or_init(|| None); STDOUT_FD.get_or_init(|| None); STDERR_FD.get_or_init(|| None); return; }; let stdio: [Option<(u64, u64)>; 3] = - postcard::from_bytes(&rpc::send_call(vfs_pid, 2, 5, &[]).get_return()).unwrap(); + postcard::from_bytes(&rpc::send_call(proc_man_pid, 8, 1, &[]).get_return()).unwrap(); STDIN_FD.get_or_init(|| stdio[0]); STDOUT_FD.get_or_init(|| stdio[1]); STDERR_FD.get_or_init(|| stdio[2]);