From 1f157b9c8b5a768f9f69e95ecbad2e1dc76e20c3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 15 Sep 2022 11:30:19 +0000 Subject: [PATCH 1/3] Bump nix from 0.14.1 to 0.25.0 Bumps [nix](https://github.com/nix-rust/nix) from 0.14.1 to 0.25.0. - [Release notes](https://github.com/nix-rust/nix/releases) - [Changelog](https://github.com/nix-rust/nix/blob/master/CHANGELOG.md) - [Commits](https://github.com/nix-rust/nix/compare/v0.14.1...v0.25.0) --- updated-dependencies: - dependency-name: nix dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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" From 6d827495efcde4f3922ced2b72d654f43f6225c4 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Thu, 15 Sep 2022 13:36:59 +0200 Subject: [PATCH 2/3] Fix: signal::kill() returns Errno directly now Signed-off-by: Matthias Beyer --- src/process.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/process.rs b/src/process.rs index 1fae19bd..9838f698 100644 --- a/src/process.rs +++ b/src/process.rs @@ -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)), From 8b72391d29793284763270b7ae76c0feca828e84 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Sun, 9 Oct 2022 10:13:35 +0200 Subject: [PATCH 3/3] Fix: fork() call is unsafe now Signed-off-by: Matthias Beyer --- src/process.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/process.rs b/src/process.rs index 9838f698..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(