Fork fails

Michael Still mikal at stillhq.com
Fri Sep 20 11:08:14 EST 2002


On Thu, 19 Sep 2002, Damien Elmes wrote:

> Michael Still <mikal at stillhq.com> writes:
>
> > On Thu, 19 Sep 2002, Martijn van Oosterhout wrote:
> >
> >> You _are_ wait()ing on all the processes right? Remember, a process is not
> >> gone until it exits *and* the parent wait()s for it. There is some hack
> >> about ignoring SIGCHLD that may work but just doing a wait() when you know
> >> the process is done should be enough.
> >
> > Hmmmmm. Ok, so the process still occupies a "process slot" (I don't know
> > if this is a real term) until someone asks for the result of the process,
> > by using wait(). Therefore, even if it is no longer running, I can have
> > ulimit pain.
>
> Exactly. But if you're on linux, zombie processes will show in a ps listing,
> so you'd know it if they were hanging around.

Nah, there definitely weren't any zombie processes. Anyway adding a
waitpid() has worked.

Thanks all for your help,
Mikal

-- 

Michael Still (mikal at stillhq.com)     UTC +10 hours




More information about the linux mailing list