Commit dbb885b
committed
Decouple the job-reap test's child from the server's stdin pipe
The grandchild was freezing at interpreter startup for as long as the
server sat in its blocking stdin read: CPython queries fd 0 during
startup, the child's inherited stdin was the server's stdin pipe (a
synchronous file object), and Windows serializes that query behind the
server's pending ReadFile. The child only thawed when the client closed
stdin at shutdown - at which point the job-handle close correctly
reaped it before it could connect. Spawning the child with
stdin=DEVNULL removes the coupling, so it boots immediately and the
kill-on-job-close contract can be observed.
Also reverts the previous commit's base-interpreter bypass: the venv
launcher was not involved (the freeze reproduces identically with the
base interpreter). The same stdin coupling applies to any Windows stdio
server that spawns Python children without redirecting their stdin.1 parent 1dc0f35 commit dbb885b
1 file changed
Lines changed: 11 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
97 | 96 | | |
98 | | - | |
| 97 | + | |
| 98 | + | |
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| |||
0 commit comments