diff --git a/Cargo.toml b/Cargo.toml index fed21a37..59bcf8ee 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,7 +15,7 @@ readme = "README.md" [dependencies] comma = "1.0" -nix = "0.14" +nix = "0.25" regex = "1" tempfile = "3" thiserror = "1.0.34" diff --git a/src/process.rs b/src/process.rs index 1fae19bd..1bee7b8e 100644 --- a/src/process.rs +++ b/src/process.rs @@ -98,7 +98,7 @@ impl PtyProcess { // on Linux this is the libc function, on OSX this is our implementation of ptsname_r let slave_name = ptsname_r(&master_fd)?; - match fork()? { + match unsafe { fork()? } { ForkResult::Child => { setsid()?; // create new session with child as session leader let slave_fd = open( @@ -202,7 +202,7 @@ impl PtyProcess { match signal::kill(self.child_pid, sig) { Ok(_) => {} // process was already killed before -> ignore - Err(nix::Error::Sys(nix::errno::Errno::ESRCH)) => { + Err(nix::errno::Errno::ESRCH) => { return Ok(wait::WaitStatus::Exited(Pid::from_raw(0), 0)) } Err(e) => return Err(Error::from(e)),