From 643aedaedbc8d39de96f0efeb006bc72d46d23fb Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Thu, 30 Dec 2021 01:14:50 -0500 Subject: better handling of file descriptors across fork --- src/command.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/command.rs') 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 { 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 || { -- cgit v1.2.3-54-g00ecf