Set CLI args for PIDs 0 1 and 2 on proc_man start

This commit is contained in:
pjht 2024-11-10 08:30:30 -06:00
parent 02c1f441ae
commit 6a594dcefc
Signed by: pjht
GPG Key ID: 7B5F6AFBEC7EE78E

View File

@ -79,8 +79,11 @@ fn main() {
let proc_man_pid = run_initrd_proc(&initrd, "bin/proc_man");
let proc_man_client = proc_man_rpc::Client::new(proc_man_pid);
proc_man_client.new_proc(0, None).unwrap();
proc_man_client.set_cli_args(0, vec!["init".into()]).unwrap();
proc_man_client.new_proc(1, Some(0)).unwrap();
proc_man_client.set_cli_args(1, vec!["bin/syslog".into()]).unwrap();
proc_man_client.new_proc(2, Some(0)).unwrap();
proc_man_client.set_cli_args(2, vec!["bin/proc_man".into()]).unwrap();
let vfs_pid = run_initrd_proc(&initrd, "bin/vfs");
let vfs_client = vfs_rpc::Client::new(vfs_pid);
run_initrd_proc(&initrd, "bin/devfs");
@ -157,7 +160,7 @@ fn run_initrd_proc(initrd: &TarArchiveRef, path: &str) -> u64 {
let pid = new_process(entry as _, space).unwrap();
if let Some(proc_man_pid) = syscalls::try_get_registered(3) {
let proc_man_client = proc_man_rpc::Client::new(proc_man_pid);
proc_man_client.set_cli_args(pid, vec![path.to_string().parse().unwrap()]).unwrap();
proc_man_client.set_cli_args(pid, vec![path.into()]).unwrap();
}
syscalls::wake_new(pid).unwrap();
pid