fix: SA.RESTART on the SIGWINCH sigaction so pty resize stops exiting the history TUI (v1.29.22) The handler itself was already safe (flag-only atomic), but installing it without SA.RESTART meant every SIGWINCH interrupted the blocked read(2) inside the TUI's main loop with EINTR. readInput's catch-all treated that error as a quit, the loop broke, and the defers ran leaveAltScreen + terminal_state.restore -- so the alt screen disappeared and the prompt returned. Exit code 0, no panic, but indistinguishable from a crash to the user. Add std.c.SA.RESTART so the read auto-restarts; the resize flag is still observed on the next keystroke and the next render picks up the new term_rows/term_cols. Adds a python-pty regression in 02-history.sh that drives koh log through 9 resizes (down to 4x40, up to 200x300) with keystrokes between, asserts the TUI only exits on an explicit q.
$ koh steal kepr.uk/koh@d4e720a41e4f
·
parent: 15bd4873da67
discussion
log in to leave a comment.