[net.bugs.4bsd] Interrupting login cshells

sibley (02/04/83)

In 4.1BSD, csh will not allow any "onintr" from a terminal.  However, it
is possible to get a login shell to ignore interrupts by sourcing a script
with "onintr -" in it.  If you later send an interrupt signal (^? or del)
to this shell, there is no containing interactive shell to handle it, so
it quits -- i.e., you get logged out and get a core dump of csh.

I have (or rather, until I figured this out today, I had) an "onintr -"
in my .login file.  This was because it would put me in "mail" if I had
mail, and I wanted to be able to send interrupts to mail rather than have
them intercepted by the containing cshell.  (And if you don't ignore
interrupts, the shell does catch them rather than passing them to mail.)
In retrospect, this was pretty dumb of me.

Once interrupts are being ignored, it's pretty easy to send one to the
login cshell.  E.g., trying to kill a process which is in fact finished,
although its output is still being sent to the teminal.

Is this a bug or a feature?  (I suppose by definition it's a feature...)

Dave Sibley
Department of Mathematics
Penn State University
psuvax!sibley