mirror of
https://github.com/python/cpython.git
synced 2025-07-30 06:34:15 +00:00
Resolves issues 5155, 5313, 5331 - bad file descriptor error with processes in processes
This commit is contained in:
parent
0c9eb43149
commit
1b90efbdc5
5 changed files with 110 additions and 2 deletions
|
@ -220,7 +220,8 @@ class Process(object):
|
|||
self._children = set()
|
||||
self._counter = itertools.count(1)
|
||||
try:
|
||||
os.close(sys.stdin.fileno())
|
||||
sys.stdin.close()
|
||||
sys.stdin = open(os.devnull)
|
||||
except (OSError, ValueError):
|
||||
pass
|
||||
_current_process = self
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue