Skip to content

Commit 4912da3

Browse files
bors[bot]dependabot[bot]matthiasbeyer
authored
Merge #76
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 <mail@beyermatthias.de>
2 parents b94b980 + 8b72391 commit 4912da3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ readme = "README.md"
1515

1616
[dependencies]
1717
comma = "1.0"
18-
nix = "0.14"
18+
nix = "0.25"
1919
regex = "1"
2020
tempfile = "3"
2121
thiserror = "1.0.34"

src/process.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ impl PtyProcess {
9898
// on Linux this is the libc function, on OSX this is our implementation of ptsname_r
9999
let slave_name = ptsname_r(&master_fd)?;
100100

101-
match fork()? {
101+
match unsafe { fork()? } {
102102
ForkResult::Child => {
103103
setsid()?; // create new session with child as session leader
104104
let slave_fd = open(
@@ -202,7 +202,7 @@ impl PtyProcess {
202202
match signal::kill(self.child_pid, sig) {
203203
Ok(_) => {}
204204
// process was already killed before -> ignore
205-
Err(nix::Error::Sys(nix::errno::Errno::ESRCH)) => {
205+
Err(nix::errno::Errno::ESRCH) => {
206206
return Ok(wait::WaitStatus::Exited(Pid::from_raw(0), 0))
207207
}
208208
Err(e) => return Err(Error::from(e)),

0 commit comments

Comments
 (0)