Python multiprocessing stdin input
When you take a look at Pythons implementation of multiprocessing.Process._bootstrap() you will see this: if sys.stdin is not None: try: sys.stdin.close() sys.stdin = open(os.devnull) except (OSError, ValueError): pass You can also confirm this by using: >>> import sys >>> import multiprocessing >>> def func(): … print(sys.stdin) … >>> p = multiprocessing.Process(target=func) >>> p.start() >>> <_io.TextIOWrapper … Read more