aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2021-11-10 12:26:31 -0500
committerJesse Luehrs <doy@tozt.net>2021-11-10 12:26:31 -0500
commit9261c1f23265fa1e25ffd46581b427f85bedf474 (patch)
tree62c75c45614dfbd4624c6c934486a37729788c1e
parent9d843436ffc583d95beff7660011eabcaf54fb62 (diff)
downloadpty-process-9261c1f23265fa1e25ffd46581b427f85bedf474.tar.gz
pty-process-9261c1f23265fa1e25ffd46581b427f85bedf474.zip
bump deps
-rw-r--r--Cargo.toml26
-rw-r--r--src/command.rs16
2 files changed, 20 insertions, 22 deletions
diff --git a/Cargo.toml b/Cargo.toml
index e044317..f038732 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -12,22 +12,22 @@ categories = ["asynchronous", "command-line-interface"]
license = "MIT"
[dependencies]
-libc = "0.2"
-nix = "0.20"
-thiserror = "1.0"
+libc = "0.2.107"
+nix = "0.23.0"
+thiserror = "1.0.30"
-async-io = { version = "1.3", optional = true }
-async-process = { version = "1.0", optional = true }
-tokio = { version = "1.2", optional = true, features = ["fs", "process", "net"] }
-futures = { version = "0.3", optional = true }
+async-io = { version = "1.6.0", optional = true }
+async-process = { version = "1.3.0", optional = true }
+tokio = { version = "1.13.0", optional = true, features = ["fs", "process", "net"] }
+futures = { version = "0.3.17", optional = true }
[dev-dependencies]
-async-std = { version = "1.9", features = ["unstable"] }
-async-executor = "1.4"
-regex = "1.4"
-smol = "1.2"
-term_size = "0.3"
-tokio = { version = "1.2", features = [ "rt-multi-thread", "macros", "io-std", "io-util", "time" ] }
+async-std = { version = "1.10.0", features = ["unstable"] }
+async-executor = "1.4.1"
+regex = "1.5.4"
+smol = "1.2.5"
+term_size = "0.3.2"
+tokio = { version = "1.13.0", features = [ "rt-multi-thread", "macros", "io-std", "io-util", "time" ] }
[features]
default = ["backend-std"]
diff --git a/src/command.rs b/src/command.rs
index ff8a7cf..df5ed62 100644
--- a/src/command.rs
+++ b/src/command.rs
@@ -49,9 +49,8 @@ where
self.std_fds(stdin, stdout, stderr);
let pre_exec = move || {
- nix::unistd::setsid().map_err(|e| e.as_errno().unwrap())?;
- set_controlling_terminal(pts_fd)
- .map_err(|e| e.as_errno().unwrap())?;
+ nix::unistd::setsid()?;
+ set_controlling_terminal(pts_fd)?;
// in the parent, destructors will handle closing these file
// descriptors (other than pt, used by the parent to
@@ -59,15 +58,14 @@ where
// the child, we end by calling exec(), which doesn't call
// destructors.
- // XXX unwrap
- nix::unistd::close(pt_fd).map_err(|e| e.as_errno().unwrap())?;
- nix::unistd::close(pts_fd).map_err(|e| e.as_errno().unwrap())?;
+ nix::unistd::close(pt_fd)?;
+ nix::unistd::close(pts_fd)?;
// at this point, stdin/stdout/stderr have already been
// reopened as fds 0/1/2 in the child, so we can (and should)
// close the originals
- nix::unistd::close(stdin).map_err(|e| e.as_errno().unwrap())?;
- nix::unistd::close(stdout).map_err(|e| e.as_errno().unwrap())?;
- nix::unistd::close(stderr).map_err(|e| e.as_errno().unwrap())?;
+ nix::unistd::close(stdin)?;
+ nix::unistd::close(stdout)?;
+ nix::unistd::close(stderr)?;
Ok(())
};