Commit 71521d1
committed
Don't close channels when a PID hasn't started
If check_close() ran prior to a server channel exec/shell
request, it would send a close immediately.
This fix changes it to exclude write_fd==FD_UNINIT from
being closed there.
When a channel was closed by the time shell/exec request
was received, then data sent hits an assertion.
This fixes #321 on Github.
The "pid == 0" check was initially added to avoid waiting
to close a channel when a process has never been launched
(which is correct), but that isn't correct in the case
of the closed-fd test.
Fixes: 8e6f73e ("- Remove "flushing" handling for exited processes)1 parent 588072a commit 71521d1
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
317 | 317 | | |
318 | 318 | | |
319 | 319 | | |
320 | | - | |
| 320 | + | |
| 321 | + | |
321 | 322 | | |
322 | 323 | | |
323 | 324 | | |
| |||
0 commit comments