Fork fails

Martijn van Oosterhout kleptog at
Thu Sep 19 21:39:34 EST 2002

On Thu, Sep 19, 2002 at 07:49:14PM +1000, Michael Still wrote:
> On Thu, 19 Sep 2002, Michael Still wrote:
> > On Thu, 19 Sep 2002, Sam Couter wrote:
> >
> > > I'm assuming you've checked 'ulimit -a'? The important limit is max user
> > > processes. Set it using ulimit -u, when using bash at least. On my
> > > system (Debian) it defaults to 256.
> >
> > Yeah, I did think about this. THe bit that made me not think that it is
> > this is that there is only ever two process running at once, assuming that
> > my code isn't remarkably bad (which is always an option).
> I've checked this, and there aren't heaps of extra processes.
> Interestingly, the entire box (at least for my user, I didn't think to
> check others) refuses to spawn processes until I have killed the forking
> app.

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.

Martijn van Oosterhout   <kleptog at>
> There are 10 kinds of people in the world, those that can do binary
> arithmetic and those that can't.

More information about the linux mailing list