-
-
Notifications
You must be signed in to change notification settings - Fork 33.6k
Open
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-subprocessSubprocess issues.Subprocess issues.type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
subprocess.py when using _posixsubprocess.c has a pipe that it waits on to indicate that the child process exec system call succeeded, or to report an error from the child up to including an exec failure. Normally this is trivial and instant. But it is technically possible for a system to have other things going on that could lead this to take a while in unusual circumstances:
Line 1873 in 20cf32e
| part = os.read(errpipe_read, 50000) |
We should change this to a non-blocking read or poll call and have it support a timeout so that subprocess timeout support works in this scenario.
motivation: trying to debug an unusual process launching issue myself, and this user report: https://discuss.python.org/t/sporadic-hang-in-subprocess-run/26213.
Metadata
Metadata
Assignees
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-subprocessSubprocess issues.Subprocess issues.type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error