diff --git a/src/main.rs b/src/main.rs index 955fc31..5edcc56 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,7 +1,7 @@ use nix::{ libc::{c_long, EPERM, ORIG_RAX}, sys::stat::Mode, - unistd::{getpid, getppid}, + unistd::{getpid, getppid, Pid}, }; use std::io::Write; use std::{ @@ -74,7 +74,7 @@ fn main() -> anyhow::Result<()> { loop { log::debug!("parent: waitpid..."); - let waitstatus = waitpid(child, None)?; + let waitstatus = waitpid(Pid::from_raw(-1), None)?; match waitstatus { WaitStatus::Exited(pid, ret) => {