From 5926386f81ea49903db9d5095058787ed91cff3d Mon Sep 17 00:00:00 2001 From: Thomas Grainger Date: Wed, 20 Jul 2022 10:24:21 +0100 Subject: [PATCH] DRY os_dup call --- uvloop/handles/process.pyx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/uvloop/handles/process.pyx b/uvloop/handles/process.pyx index 14c66b31..0146f92e 100644 --- a/uvloop/handles/process.pyx +++ b/uvloop/handles/process.pyx @@ -496,10 +496,7 @@ cdef class UVProcessTransport(UVProcess): # shouldn't ever happen raise RuntimeError('cannot apply subprocess.STDOUT') - newfd = os_dup(io[1]) - os_set_inheritable(newfd, True) - self._close_after_spawn(newfd) - io[2] = newfd + io[2] = self._file_redirect_stdio(io[1]) elif _stderr == subprocess_DEVNULL: io[2] = self._file_devnull() else: