add print messages
This commit is contained in:
parent
d9b4c98c1b
commit
55c0dd03df
|
@ -37,14 +37,17 @@ fn init() -> Result<()> {
|
|||
config::Mode::Spawn => {
|
||||
// set up a process reaper. any time a child process dies, a SIGCHLD will be fired, and
|
||||
// the signal handler will reap the processes
|
||||
eprintln!("installing signal handler");
|
||||
system::syscall::signal(libc::SIGCHLD, handle_sigchld)?;
|
||||
loop {
|
||||
eprintln!("spawning {command}");
|
||||
if let Err(e) = std::process::Command::new(command).spawn() {
|
||||
eprintln!("Encountered error running {command}: {e}");
|
||||
}
|
||||
}
|
||||
}
|
||||
config::Mode::Exec => {
|
||||
eprintln!("pivoting to {command}");
|
||||
system::syscall::execv(command, &[])?;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue