This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author OG7
Recipients OG7, grahamd, i000, jnoller, ptn
Date 2009-06-19.15:55:23
SpamBayes Score 2.2532699e-07
Marked as misclassified No
Message-id <>
Please do this:

--- a/multiprocessing/
+++ b/multiprocessing/
@@ -225,7 +225,8 @@ class Process(object):
             self._children = set()
             self._counter = itertools.count(1)
-                os.close(sys.stdin.fileno())
+                sys.stdin.close()
+                sys.stdin = open(os.devnull)
             except (OSError, ValueError):
             _current_process = self

One shouldn't close the fileno after the file has been closed. The
stdlib raises an error, and the open(os.devnull) won't be reached. If no
error was thrown, it would be worse. This would be closing a fileno that
doesn't belong to sys.stdin anymore and may be used somewhere else.

The open(os.devnull) bit is both so that no one tries to do anything
with the old stdin anymore, and to let applications attempt to read from
stdin without an IOError.
Date User Action Args
2009-06-19 15:55:26OG7setrecipients: + OG7, jnoller, grahamd, ptn, i000
2009-06-19 15:55:26OG7setmessageid: <>
2009-06-19 15:55:24OG7linkissue5313 messages
2009-06-19 15:55:23OG7create