-
Notifications
You must be signed in to change notification settings - Fork 479
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Older versions of multiprocessing closed fd 0
Problem ======= Per, https://docs.python.org/2/library/multiprocessing.html#all-platforms """ multiprocessing originally unconditionally called: os.close(sys.stdin.fileno()) in the multiprocessing.Process._bootstrap() method """ Solution ======== We simulate in test case by using multiprocessing module and closing stdin before calling pexpect.spawn. Change use of __stdin__.fileno() with __stdout__.fileno(), for tcgetattr(3), any of stdin/out/err is fine. Then, allow for ValueError("I/O operation on closed file") could be raised if stdout is closed, and make another test case where we close it as such.
- Loading branch information
Showing
2 changed files
with
44 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters