This is the record of an abcd-managed repository

abcdBetav0.16.2 · 2026-11-06

Development record

A SIGTSTP sent from outside (kill -TSTP, not the Ctrl-Z key, which raw mode delivers as a byte) stops an abcd process that holds a term.RawSession with the terminal still raw; SIGTTIN and SIGTTOU sent from outside do the same. On SIGCONT the session enters raw mode again and redraws, so only the stopped interval is affected. The fix the security review of the answer loop proposed (catch SIGTSTP with signal.Notify, then signal.Reset and kill(self, SIGTSTP) to stop) does not work in Go: a scratch probe (Notify, Reset, then kill(getpid, SIGTSTP)) showed the process is never stopped, because the runtime keeps its own handler installed for SIGTSTP once it has been notified (runtime sigdisable leaves it while sigInstallGoHandler is true) and that handler drops an unwanted SIGTSTP. Catching it would therefore make SIGTSTP ignored for the rest of the process, Ctrl-Z in cooked mode after the interview included, and would swallow the kill(0, SIGTSTP) RawSession.Suspend stops with.

issuewontfixminoriss-2610032115023656

A SIGTSTP sent from outside (kill -TSTP, not the Ctrl-Z key, which raw mode delivers as a byte) stops an abcd process that holds a term.RawSession with the terminal still raw; SIGTTIN and SIGTTOU sent from outside do the same. On SIGCONT the session enters raw mode again and redraws, so only the stopped interval is affected. The fix the security review of the answer loop proposed (catch SIGTSTP with signal.Notify, then signal.Reset and kill(self, SIGTSTP) to stop) does not work in Go: a scratch probe (Notify, Reset, then kill(getpid, SIGTSTP)) showed the process is never stopped, because the runtime keeps its own handler installed for SIGTSTP once it has been notified (runtime sigdisable leaves it while sigInstallGoHandler is true) and that handler drops an unwanted SIGTSTP. Catching it would therefore make SIGTSTP ignored for the rest of the process, Ctrl-Z in cooked mode after the interview included, and would swallow the kill(0, SIGTSTP) RawSession.Suspend stops with.

Grounds

  • declined: catching SIGTSTP in Go leaves the runtime's handler installed and drops the signal (probe in the fix round), so the review's fix would disable job control process-wide; the shell already restores the terminal across a stop

Frontmatter

idiss-2610032115023656
typeissue
lifecyclewontfix
severityminor

mentions1