TRAPPING SIGNALS IN CSH

Tony Facca fsfacca at AVELON.LERC.NASA.GOV
Fri Apr 26 07:17:59 AEST 1991


> password.  My problem arises when the user hits Ctrl-C when he first logs
> in which kills the execution of /etc/cshrc, thus my expiration checker does
> not get executed.  How can I trap these signals in a csh?
> In a Bourne shell all I have to do is trap them with the trap command.
> 

In C Shell you would user "onintr -" to turn off all interrupts, and then
"onintr" to turn them back on after the critical section of code.  If you
have an interrupt handler, you can branch to it using "onintr xxx" where 
xxx is a label, as in "goto xxx".

-----------------------------------------------------------------------------
Tony Facca   |   fsfacca at avelon.lerc.nasa.gov      |     phone: 216-433-8318
-----------------------------------------------------------------------------
      You are at Witt's end.  Passages lead off in *all* directions.



More information about the Comp.sys.sgi mailing list