[comp.unix.shell] How to disable interrupt key strokes???

jian@kuhub.cc.ukans.edu (09/12/90)

For some reason, I want to disable any interrupt key stroke like Ctrl C, ESC,
and Ctrl Z. How could I do that by using SHELL or CSHELL command. Any help
appreciated.

Jian Q. Li
jian@kuhub.cc.ukans.edu
             

gt0178a@prism.gatech.EDU (BURNS) (09/14/90)

in article <25538.26ee215b@kuhub.cc.ukans.edu>, jian@kuhub.cc.ukans.edu says:
> For some reason, I want to disable any interrupt key stroke like Ctrl C, ESC,
> and Ctrl Z. How could I do that by using SHELL or CSHELL command. Any help
> appreciated.

It usually involves giving the stty command for disabling a ctrl-sequence.
It's usually 'stty susp "undel"' (BSD) or 'stty swtch "^-" (SysV) to
disable ^Z, and similarly for the intr (^C) and quit (abort program w/
core dump) interrupt definitions. SysV also allows 'stty -isig' to turn
off interpretation of the control char. (usually ^C) assigned to 'intr',
which has the advantage that you just have to do an 'stty isig' to
re-enable it, instead of remembering what key you assigned to 'intr' and
re-installing the definition. Check your stty man page for exact syntax.
-- 
BURNS,JIM
Georgia Institute of Technology, Box 30178, Atlanta Georgia, 30332
uucp:	  ...!{decvax,hplabs,ncar,purdue,rutgers}!gatech!prism!gt0178a
Internet: gt0178a@prism.gatech.edu

guy@auspex.auspex.com (Guy Harris) (09/15/90)

>> For some reason, I want to disable any interrupt key stroke like Ctrl C, ESC,
>> and Ctrl Z. How could I do that by using SHELL or CSHELL command. Any help
>> appreciated.

Dunno what ESC is as an interrupt keystroke; unlike ^C (which is often,
although not always, the "intr" character) and ^Z (which is usually the
"susp" character), ESC isn't normally an interrupt keystroke.  It may be
used as a "secondary end-of-line" character by some shells, such as
those that support filename completion, but that's not an interrupt
keystroke.

>SysV also allows 'stty -isig' to turn off interpretation of the control
>char. (usually ^C) assigned to 'intr',

*And* the ones assigned to "quit", "swtch" - *and* "susp", if your system
has an S5-flavored tty driver and job control.