diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-22 19:59:00 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-22 20:09:15 -0300 |
| commit | 34e2d82a322bd3767a8ec62b3a4c0894399e8c04 (patch) | |
| tree | f017d7aa398d51daf132367c3587d824907e6759 /dev/Shell.zig | |
| parent | 79b73e14711e48e61d0f742622671a8fcfd8d054 (diff) | |
| download | pardes-34e2d82a322bd3767a8ec62b3a4c0894399e8c04.tar.gz pardes-34e2d82a322bd3767a8ec62b3a4c0894399e8c04.zip | |
tty: a TERM that reaches a session while it leaves its terminal (a quit, a Detach, the detach a hangup makes) no longer leaves that terminal raw for good: `Screen.leave` let `Killed` go first and the cooked modes came back last (vaxis's `Tty.deinit`), after the kitty images, the alternate screen's exit (flushed at once) and vaxis's teardown, so a TERM in between found nothing to put back and died with the main screen back and the modes raw, nothing of pardes putting them back after it (at a quit the stub then dies of the same TERM, and a shell that does not reset its own modes prompts on a raw terminal); now `Killed.disarm` puts the cooked modes back itself and is called last, just before vaxis's own put-back, so a TERM anywhere in a leave finds them back or puts them back (dev/tui/tui.zig); the process case `killedTty` failed so in about one gate in ten (merge49 and merge58, "the terminal left raw" with the main screen back: its HUP round, which TERMs the session right after the stub dies of the hangup, while the session leaves the terminal that hung up) and now names its signal; not reproduced as it is (the base pinned to one CPU 0 of 40 failed, unpinned beside a second copy 0 of 80); with the window widened by an experiment's 300 ms sleep before vaxis's put-back and the test's TERM 100 ms after the stub's death, the base failed 10 of 10 with the gates' words ("HUP: the terminal left raw", the main screen back, 3.7-4.5 s as the gates' 3.6 and 4.2 s) and this passed 10 of 10 with the same sleep after its disarm; after: the case pinned 40 of 40, core-test 917/1074 (157 skipped), shell-test 1116/1119 (3 skipped), process-test 0 of 146 (load 10.6), as pairs 0 of 146 (load 11.7, `tty boot: ninep` refused a dial in the parallel batch and passed again alone); left as it is: on a hangup the stub dies at once (runtime/daemon.zig `forward`), before the session has left the terminal, so with the terminal still there (a `kill -HUP` of the job) the shell's prompt comes before the session's put-back, which then sets the cooked modes and the main screen over it (not raw)
Co-Authored-By: Claude Opus <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'dev/Shell.zig')
0 files changed, 0 insertions, 0 deletions
