|
|
|
|
|
by tolciho
1414 days ago
|
|
The SIGINT (if the terminal is configured to generate one) goes to the
foreground process group, not the current process. See the termios man
page, look for INTR. This gets complicated in shell pipelines (oh look,
a process group) where one or more of the tools involved are fiddling
with the global terminal state, in which case there may be a process
group signal, or there might instead be a key for some random program of
the pipeline to to read, which it may ignore. With an important productivity app like rogue(6) there is (probably)
only one process in the foreground process group, and curses has
(probably) set the terminal to have control+c either ignored or
delivered to the rogue process as a key event. The player probably does
not want to have their rogue process vanish because they hit control+c
by habit, like trek(6) likes to do, but someone wrote blocksig(1) as an
exec wrapper so that SIGINT can be ignored. With a complicated shell pipeline, the
player probably does want the whole thing to go away, but that may be
difficult depending on exactly how complicated the shell pipeline is and
whether any processes in that pipeline are fiddling with the global
terminal state. (Global to the process groups and their PIDs under that
particular terminal, not the whole system or universe or whatever. But
global enough to cause problems.) Opinions also vary here, some want that LISP image to never go away
(those emacs users, probably), others may want control+c to murder the LISP
image so they can go back to hacking in vi. POSIX probably says
something about shell pipelines and control+c and such, which various
shells may or may not follow, exactly. Etc... |
|
And you probably know that the author of curses is the author of rogue!