Skip to content

Commit 5926386

Browse files
committed
DRY os_dup call
1 parent d5fe279 commit 5926386

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

uvloop/handles/process.pyx

+1-4
Original file line numberDiff line numberDiff line change
@@ -496,10 +496,7 @@ cdef class UVProcessTransport(UVProcess):
496496
# shouldn't ever happen
497497
raise RuntimeError('cannot apply subprocess.STDOUT')
498498

499-
newfd = os_dup(io[1])
500-
os_set_inheritable(newfd, True)
501-
self._close_after_spawn(newfd)
502-
io[2] = newfd
499+
io[2] = self._file_redirect_stdio(io[1])
503500
elif _stderr == subprocess_DEVNULL:
504501
io[2] = self._file_devnull()
505502
else:

0 commit comments

Comments
 (0)