add print messages

This commit is contained in:
Ryan Heywood 2025-07-09 00:53:11 -04:00
parent d9b4c98c1b
commit 55c0dd03df
Signed by: ryan
GPG Key ID: 8E401478A3FBEF72
1 changed files with 3 additions and 0 deletions

View File

@ -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, &[])?;
}
}