Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Update nix 0.25 #76

Merged
merged 3 commits into from
Oct 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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