Skip to content

Commit

Permalink
Merge #76
Browse files Browse the repository at this point in the history
76: Update nix 0.25 r=matthiasbeyer a=matthiasbeyer



Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Matthias Beyer <[email protected]>
  • Loading branch information
3 people authored Oct 9, 2022
2 parents b94b980 + 8b72391 commit 4912da3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions src/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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)),
Expand Down

0 comments on commit 4912da3

Please sign in to comment.