diff options
author | Jesse Luehrs <doy@tozt.net> | 2021-12-30 01:14:50 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2021-12-30 01:14:50 -0500 |
commit | 643aedaedbc8d39de96f0efeb006bc72d46d23fb (patch) | |
tree | cb1dd6cd0671dd4857421284432338af56f18ff2 /src/command.rs | |
parent | 06080c4d87766a717ab2b7f31f5d418b651e6969 (diff) | |
download | pty-process-643aedaedbc8d39de96f0efeb006bc72d46d23fb.tar.gz pty-process-643aedaedbc8d39de96f0efeb006bc72d46d23fb.zip |
better handling of file descriptors across fork
Diffstat (limited to 'src/command.rs')
-rw-r--r-- | src/command.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/command.rs b/src/command.rs index dfe9684..c50af30 100644 --- a/src/command.rs +++ b/src/command.rs @@ -104,14 +104,14 @@ impl Command { pty: &crate::Pty, ) -> crate::Result<async_process::Child> { let (stdin, stdout, stderr, mut pre_exec) = - crate::sys::setup_subprocess(pty.pts(), Some(pty))?; + crate::sys::setup_subprocess(pty.pts())?; self.inner.stdin(self.stdin.take().unwrap_or(stdin)); self.inner.stdout(self.stdout.take().unwrap_or(stdout)); self.inner.stderr(self.stderr.take().unwrap_or(stderr)); - // Safety: setsid() and close() are async-signal-safe functions and - // ioctl() is a raw syscall (which is inherently async-signal-safe). + // Safety: setsid() is an async-signal-safe function and ioctl() is a + // raw syscall (which is inherently async-signal-safe). if let Some(mut custom) = self.pre_exec.take() { unsafe { self.inner.pre_exec(move || { |