![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Cannot catch SIGINT while serial break condition occurs | gzz | High Level Programming | 13 | 11-23-2007 08:06 AM |
| file handling problem in perl...... | vivekshankar | UNIX for Dummies Questions & Answers | 2 | 06-02-2005 09:23 PM |
| Inter Process File Handling Problem | saurabhjain | HP-UX | 4 | 05-12-2005 12:49 PM |
| exception handling | RichardS | UNIX for Advanced & Expert Users | 1 | 06-16-2004 06:29 PM |
| Parameter handling | AkumaTay | UNIX for Dummies Questions & Answers | 1 | 05-18-2002 03:09 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Problem with handling SIGINT
For a program I am designing, which involves handling the keyboard input Ctrl^c (SIGINT), it is taking ages for the program to actually recognise and perform the corresponding action whenever I run it and hit Ctrl^C at the CL. I have to do at least 3 Ctrl^Cs before the program will actually register and handle SIGINT appropriately.
Currently Im using signal() to map the various types of unix signals (i.e SIGINT, SIGSTSP) to handler functions I have defined in my program. What the handler functions do is call exit(0) (which quits the program) whenever the corresponding signal has been received by the program. As I mentioned before, it is taking several Ctrl^Cs to get the handler functions to be invoked, when it should just be 1 Ctrl^C. Im unsure what could be causing my problem. Please feel free to make any suggestions. |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|