Development record
After Ctrl-Z and a resume, the plain-Terminal answer loop can fail to come back: on the macOS merge-queue runner (run 37210244082, 2026-10-04) the subtest TestLongListRestoresTerminalOnInterrupt/ctrl-z restores, and SIGCONT re-enters and redraws saw the child stop and the terminal restored while stopped (both asserted), then after SIGCONT the child wrote nothing for 20 s, so the question was not redrawn and raw mode was not re-entered. A person would see Ctrl-Z, fg, and the question still frozen until Ctrl-C. Lead: RawSession.reenter's tcsetattr (internal/term/raw.go) runs from a process group that is not the terminal's foreground group, and the kernel answers with SIGTTOU, stopping the child again. Alternative: a race between Suspend's wait for its continue token and the watch goroutine's continued(). It ejected an unrelated pull request from the merge queue; the detector stays armed.
After Ctrl-Z and a resume, the plain-Terminal answer loop can fail to come back: on the macOS merge-queue runner (run 37210244082, 2026-10-04) the subtest TestLongListRestoresTerminalOnInterrupt/ctrl-z restores, and SIGCONT re-enters and redraws saw the child stop and the terminal restored while stopped (both asserted), then after SIGCONT the child wrote nothing for 20 s, so the question was not redrawn and raw mode was not re-entered. A person would see Ctrl-Z, fg, and the question still frozen until Ctrl-C. Lead: RawSession.reenter's tcsetattr (internal/term/raw.go) runs from a process group that is not the terminal's foreground group, and the kernel answers with SIGTTOU, stopping the child again. Alternative: a race between Suspend's wait for its continue token and the watch goroutine's continued(). It ejected an unrelated pull request from the merge queue; the detector stays armed.
Grounds
- pursued: a SIGCONT the kernel loses straight after the reported stop leaves the question frozen, and a resend while no new stop is reported brings it back; a stall with the kernel reporting the child stopped again, or one a second SIGCONT does not end, would show it wrong
Frontmatter
| id | iss-2610041944562639 |
|---|---|
| type | issue |
| lifecycle | resolved |
| severity | minor |
.abcd/work/issues/resolved/iss-2610041944562639-after-ctrl-z-and-a-resume-the-plain.md
open on GitHub ↗ · commit history ↗