fork()ing and SIGKILL and SIGSTOP
I am writing a program that listens on several ports, using fork() to start
a separate thread for each port. I want to be able to kill each of the
child processes when the master parent terminates. I do not know how to
implement this. I have tried signal(), and wait(), and neither will allow
trapping of SIGKILL and SIGSTOP. I have registered a function with
atexit(), and that is not run either.
I know this can be done, because when PPPD is started, and I issue the
command "kill <PPPD pid>", PPPD runs the disconnect script before quitting.
Any help would be appreciated(sp?).
ps: This is for a port redirection program. It supports multiple
desitination addresses, and multiple listening ports, all from one command
line and one executable(albeit heavly multithreaded!).
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-REQUEST@lists.debian.org . Trouble? e-mail to Bruce@Pixar.com