Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!mailrus!usenet.ins.cwru.edu!ncoast!ramsey From: ramsey@NCoast.ORG (Cedric Ramsey) Newsgroups: comp.unix.xenix.sco Subject: Catching Signals in 'C' Message-ID: <1990Sep28.115700.17508@NCoast.ORG> Date: 28 Sep 90 11:57:00 GMT Organization: North Coast Public Access *NIX, Cleveland, OH Lines: 24 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@ncoast.ORG