[CALUG] Get rid of pppd zombies?
eldonz39yid at yahoo.com
Sun Nov 27 08:18:10 CST 2005
Thanks for pointing me in the right direction.
The problem was that there were two pppd processes, one my app
started and a second spawned by pppd itself. Both had the same link
name and the second overwrote the pid entry in /var/run so when my
app got the pid from /var/run it killed the second process, not the
original. Saving the pid of the origninal pppd process instead of
getting in from /var/run solved the problem.
The app is a 24x7 data collection and monitoring job so stopping it
to kill the zombies was undesirable.
I was forking a new process before the exec of pppd. Left that out of
my description of the situation.
At 01:12 am 11/27/2005, junekis at comcast.net wrote:
>OK, well, to dig into it then,
>AS I understand it, exec doesn't work like fork. Exec substitutes
>the binary of the executable file for the binary in my current process.
>What you would need to do, (maybe you already are and I didn't pick
>it up, but)- fork your process first, then have the child use exec
>to load the pppd ?
> > On Saturday 26 November 2005 22:58, junekis at comcast.net wrote:
> > > Sourceforge has a utility called zclean that removes zombie processes///
> > > http://sourceforge.net/projects/zclean
> > Well, that may indeed get rid of the zombie, but so would pulling out the
> > power cord. Neither addresses the fundamental problem though.
> > > > I'm running pppd via exec from my C++ app. When pppd ends it leaves
> > > > behind a zombie that I haven't been able to get rid of via waitpid.
> > > > Anyone know how I can get rid of these?
> > > >
> > > > Thanks
> > > > Eldon Ziegler
> > I suspect you are doing something wrong with your usage of waitpid().
> > Have you verified that your program is the parent of the zombie?
> > - When a child dies it will be placed in a zombie state until
> > its parent does a wait on it (any of the wait variants with
> > the proper arguments will do).
> > - However, if the parent had ignored SIGCHLD prior to the child
> > dieing then the wait will not be necessary.
> > - A zombie will automatically go away if its parent dies (because
> > init will inherit the zombie and do the wait itsself).
> > _______________________________________________
> > Columbia, Maryland Linux User's Group (CALUG) mailing list
> > CALUG Website: http://www.calug.com
> > Email postings to: lug at calug.com
> > Change your list subscription options:
>Columbia, Maryland Linux User's Group (CALUG) mailing list
>CALUG Website: http://www.calug.com
>Email postings to: lug at calug.com
>Change your list subscription options: http://calug.com/mailman/listinfo/lug
More information about the lug