Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
signal handling in C
Name: freshair Date: September 4, 2004 at 20:17:41 Pacific OS: M$ Windows CPU/Ram: various
Comment:
I tried to use signal(SIGTERM,&handler()) to handle the Ctrl-C signal, but it didn't work. I also tried it with SIGINT, SIGKILL, SIGSTOP, SIGABRT, etc., but none had worked. what signal is the Ctrl-C?
Name: BlueRaja Date: September 4, 2004 at 22:10:18 Pacific
Reply:
Ctrl+c sends the SIGINT signal. Try changing the function call to: signal(SIGINT,handler); and remember to place it inside of main()
Hope that helps! ;P
AKhalifman@hotmail.com
0
Response Number 2
Name: freshair Date: September 5, 2004 at 09:44:38 Pacific
Reply:
do you know how I can find the process ID of the child that signals the parent process?
0
Response Number 3
Name: BlueRaja Date: September 5, 2004 at 12:24:03 Pacific
Reply:
I thought we were talking about DOS programming...? Let's see your code.
AKhalifman@hotmail.com
0
Response Number 4
Name: freshair Date: September 8, 2004 at 21:13:48 Pacific
Reply:
actually I'm doing C coding on Linux :P
the situation is that when I run a background process, the parent doesn't wait() for the child, but the child might still send a SIGCHLD to the parent, in which case the parent needs to handle it. I just want to know if there's a way to find the child's process ID (the source of SIGCHLD) by justing the signal.
0
Response Number 5
Name: BlueRaja Date: September 9, 2004 at 15:34:02 Pacific
Reply:
No idea, don't program Linux - post this under the Linux board.
Summary: another problem! im creating the database of a college in c++. it contains records of students. im using file handling for this purpose. i write the data on the file using xyz.write and i used xyz.rea...
Summary: All it is doing is creating a Dummy file with an HTML extension. It can be a zero length file. The file name is then fed into the FindExecutalble API along with a dummy variable and fixed length stri...