(0015034)
vda
11-03-08 14:49
|
> kill (SIGKILL) the PPPD when not used anymore. It stops but the process PPPD is a ZOMBIE after all.
Zombie is a dead process. You successfully killed it.
> In my mean software, I do a fork and execute the PPPD.
You must do one of the following in order to dispose of the zombies (your dead children):
(1) wait() for dead pppd. if you do not know when it will die, install SIGCHLD handler and kernel will tell you.
-or-
(2) do signal(SIGCHLD, SIG_IGN). Kernel will know that you are not interested in dying children.
-or-
(3) exit yourself. When parent exits, children are reparented to init. It will take care of wait()ing for them
> When my software wants to close (stop), I ask the PPPD to hang up and shut itself.
The mere thought of software which runs pppd from C code directly (not via helper scripts and the like) makes my nightmares much more vivid. :) |