Catching ^C and ^Z

Dan Bernstein brnstnd at kramden.acf.nyu.edu
Wed Sep 5 12:57:04 AEST 1990


In article <Sep.4.20.08.17.1990.1216 at utopia.rutgers.edu> deen at utopia.rutgers.edu (Cinnamon Raisin) writes:
> 	I am trying to write a quick programme to lock a terminal(TTY)
> 	when I leave it.  Essentially I want to capture all the 
> 	interrupts that can be sent from the keyboard, such as
> 	SIG_INT,SIG_QUIT and so on.  The only reasonable thing I've 
> 	found that lets me do this is ioctl().

A public-domain ``lock'' appears in the pty package. It should answer
all your questions. Watch c.s.unix.

---Dan



More information about the Comp.lang.c mailing list