Commit ba1f9aa
committed
gh-153962: Re-raise unexpected OSError in subprocess Popen._internal_poll
On POSIX, Popen._internal_poll() caught every OSError from os.waitpid()
and, unless it was ECHILD or the call came from __del__ (a non-None
_deadstate), silently discarded it, leaving returncode as None and
masking a real failure.
Add an else branch that re-raises such unexpected errors. The re-raise is
only reachable when _deadstate is None; __del__ and _cleanup() always
pass a non-None _deadstate, so __del__ still never raises. ECHILD
handling is unchanged.1 parent 32cfc88 commit ba1f9aa
3 files changed
Lines changed: 30 additions & 0 deletions
File tree
- Lib
- test
- Misc/NEWS.d/next/Library
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2191 | 2191 | | |
2192 | 2192 | | |
2193 | 2193 | | |
| 2194 | + | |
| 2195 | + | |
| 2196 | + | |
| 2197 | + | |
| 2198 | + | |
| 2199 | + | |
| 2200 | + | |
2194 | 2201 | | |
2195 | 2202 | | |
2196 | 2203 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3419 | 3419 | | |
3420 | 3420 | | |
3421 | 3421 | | |
| 3422 | + | |
| 3423 | + | |
| 3424 | + | |
| 3425 | + | |
| 3426 | + | |
| 3427 | + | |
| 3428 | + | |
| 3429 | + | |
| 3430 | + | |
| 3431 | + | |
| 3432 | + | |
| 3433 | + | |
| 3434 | + | |
| 3435 | + | |
| 3436 | + | |
| 3437 | + | |
| 3438 | + | |
| 3439 | + | |
| 3440 | + | |
3422 | 3441 | | |
3423 | 3442 | | |
3424 | 3443 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
0 commit comments