Catching ^C and ^Z

Silver gaynor at sparky.rutgers.edu
Wed Sep 5 15:20:25 AEST 1990


deen at utopia.rutgers.edu:
> [I wanna write a lockscreen.]

weisen at eniac.seas.upenn.edu:
> Under BSD, you should be able to do something like:
>        signal(SIGINT,SIG_IGN);
>        signal(SIGQUIT,SIG_IGN);
> to IGNore the signals.

SunOS signal(3):
> SIGKILL   9    kill (cannot be caught, blocked, or ignored)
> SIGSTOP   17   stop (cannot be caught, blocked, or ignored)

Therein lies the incentive to capture the characters before a shell can see
them.

Regards, [Ag]



More information about the Comp.lang.c mailing list