Merge branch 'init_nowait' into 'main'

init: Add a nowait command that immediately daemonizes

See merge request redox-os/base!45
This commit is contained in:
Jeremy Soller
2025-11-30 07:09:29 -07:00
+16
View File
@@ -179,6 +179,22 @@ pub fn run(file: &Path) -> Result<()> {
env::remove_var(&arg);
}
}
"nowait" => {
if let Some(cmd) = args.next() {
let mut command = Command::new(cmd);
for arg in args {
command.arg(arg);
}
match command.spawn() {
Ok(_child) => {}
Err(err) => println!("init: failed to execute '{}': {}", line, err),
}
} else {
println!("init: failed to run nowait: no argument");
}
}
_ => {
let mut command = Command::new(cmd.clone());
for arg in args {