Skip to content

Commit

Permalink
DRY os_dup call
Browse files Browse the repository at this point in the history
  • Loading branch information
graingert committed Jul 20, 2022
1 parent d5fe279 commit 5926386
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions uvloop/handles/process.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 5926386

Please sign in to comment.