diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-28 12:01:34 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:14 -0300 |
| commit | 990c2e1b184e9cb1fddd8eb1b05a472cfb113dde (patch) | |
| tree | 0d3327598ff2522900c33e4018ca187a89fdbeb2 /src/gui | |
| parent | 78c60342022bc44307ad789aaef163ab96ebd08b (diff) | |
| download | pardes-990c2e1b184e9cb1fddd8eb1b05a472cfb113dde.tar.gz pardes-990c2e1b184e9cb1fddd8eb1b05a472cfb113dde.zip | |
A closed terminal's shell is reaped on tty and macOS, killed if it ignores the hangup
tty and macOS hung the pty up and called waitpid once without waiting, so a shell
still exiting, or one that ignores SIGHUP, stayed a zombie or ran on with nobody
reading it; tty also never reaped a shell that exited by itself, and its spawn
into an occupied slot closed the old pty without ending the shell. host_io's
retireShell says hangup, waits 100 ms on a thread (macOS has no host timer to
poll from), then kills and reaps. The gui's own retired list, when full, left the
slot holding the old shell and refused the next spawn into that pane; it now
hands that shell to retireShell instead.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/gui')
| -rw-r--r-- | src/gui/gui.zig | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/gui.zig b/src/gui/gui.zig index 1d5d3c05..2369dd28 100644 --- a/src/gui/gui.zig +++ b/src/gui/gui.zig @@ -3786,6 +3786,10 @@ const Shell = struct { s.ptys[pane] = null; return; }; + // No room to wait for it here: a slot kept for it would refuse the + // next shell spawned into this pane until it was reaped. + host_io.retireShell(pt.pid); + s.ptys[pane] = null; } fn stopPtys(s: *Shell) void { |
