Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:13.0) Gecko/20120614 Thunderbird/13.0.1
On 7/25/12 8:14 AM, 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?
No, a slightly different problem. Bash interprets the Posix text for the
`wait' builtin as guaranteeing that the kernel will wait at least CHILD_MAX
children before reusing a PID, whether they've terminated or not.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/