bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AIX and Interix also do early PID recycling.


From: Michael Haubenwallner
Subject: Re: AIX and Interix also do early PID recycling.
Date: Wed, 25 Jul 2012 16:11:26 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.3) Gecko/20120327 Thunderbird/10.0.3

On 07/25/2012 02:14 PM, Greg Wooledge wrote:
> On Wed, Jul 25, 2012 at 09:59:28AM +0200, Michael Haubenwallner wrote:
>> OTOH, AFAICT, as long as a PID isn't waitpid()ed for, it isn't reused by 
>> fork().
>> However, I'm unable to find that in the POSIX spec.
> 
> A process that hasn't been waited for should become a zombie, which
> should be sufficient to prevent its PID being reused.  Are you saying
> that AIX and Interix don't have zombies?

Nope. My thought was that bash eventually could postpone waiting for a specific
child PID until required by the driving shell script. That is: immediately for
synchronous childs to set $?, and on "wait" for asynchronous childs. The idea
was to render storing CHILD_MAX returnvalues obsolete.
However, I'm investigating why respecting CHILD_MAX by bash doesn't work when
the kernel starts reusing PIDs after CHILD_MAX different ones.

/haubi/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]