OG7 <ony...@users.sourceforge.net> added the comment: Please do this:
--- a/multiprocessing/process.py +++ b/multiprocessing/process.py @@ -225,7 +225,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 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. ---------- Added file: http://bugs.python.org/file14320/0001-Fix-issue-5313.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue5313> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com