Catching Signals in 'C'

Cedric Ramsey ramsey at NCoast.ORG
Fri Sep 28 21:57:00 AEST 1990


Hello peoplekind. I have a question about the behavior of the
signal function. Firstly, I want to trap the control-c, break,
and other interrupt keys the user may use to stop a program.
I did this by ;

main()
{
  signal (SIGINT, (*handler1) ());
  signal (SIGQUIT, (*handler2) ());
  ... 
}


But, when I type a control-c the program handles the signal as
expected; however, when I type the control-c a second time the program 
doesn't catch it and simply exits. 

I don't know what went wrong. Does anybody outthere have any
thoughts or conjectures ? Any input is needed and desired.

Thanks,

Cedric A. Ramsey
Mail: ramsey at ncoast.ORG



More information about the Comp.unix.xenix.sco mailing list