diff options
author | R. David Murray <rdmurray@bitdance.com> | 2009-07-21 17:02:14 (GMT) |
---|---|---|
committer | R. David Murray <rdmurray@bitdance.com> | 2009-07-21 17:02:14 (GMT) |
commit | 17438dc26cb4776ce6aecd4eccf83376f4a5f56c (patch) | |
tree | 281fff473e1b5b23afe2bbee6f9cd3f87316f6dc /Lib/multiprocessing/process.py | |
parent | f37b563c72d53da8e9137f0c6846da2e3f700030 (diff) | |
download | cpython-17438dc26cb4776ce6aecd4eccf83376f4a5f56c.zip cpython-17438dc26cb4776ce6aecd4eccf83376f4a5f56c.tar.gz cpython-17438dc26cb4776ce6aecd4eccf83376f4a5f56c.tar.bz2 |
Merged revisions 73708,73738 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r73708 | jesse.noller | 2009-06-30 13:11:52 -0400 (Tue, 30 Jun 2009) | 1 line
Resolves issues 5155, 5313, 5331 - bad file descriptor error with processes in processes
........
r73738 | r.david.murray | 2009-06-30 22:49:10 -0400 (Tue, 30 Jun 2009) | 2 lines
Make punctuation prettier and break up run-on sentence.
........
Diffstat (limited to 'Lib/multiprocessing/process.py')
-rw-r--r-- | Lib/multiprocessing/process.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/multiprocessing/process.py b/Lib/multiprocessing/process.py index b034317..0b04e36 100644 --- a/Lib/multiprocessing/process.py +++ b/Lib/multiprocessing/process.py @@ -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 |