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 17:59:54 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.3) Gecko/20120327 Thunderbird/10.0.3

On 07/25/2012 04:50 PM, Chet Ramey wrote:
>> The AIX 6.1 I've debugged on has:
>>   #define CHILD_MAX 128
>>   #define _POSIX_CHILD_MAX 25
>>   sysconf(_SC_CHILD_MAX) = 1024

> Bash prefers sysconf(_SC_CHILD_MAX) and will use it over the other
> defines (lib/sh/oslib.c:getmaxchild()).  I don't know why AIX chooses
> to return a different value via sysconf than it defines for CHILD_MAX,
> especially when it seems to use the CHILD_MAX value to decide when it
> can recycle the PID space.

Well, _SC_CHILD_MAX is documented across platforms as:
(Linux)   "The max number of simultaneous processes per user ID."
(HP-UX)   "Maximum number of simultaneous processes per user ID."
(Solaris) "Max processes allowed to a UID"
(AIX)     "Specifies the number of simultaneous processes per real user ID."
(Interix) "Maximum number of simultaneous processes per user ID."

Also, one Linux machine actually shows the _SC_CHILD_MAX value equal to
kernel.pid_max (32768 here), so even Linux could see this problem in theory,
because PIDs really are recycled before kernel.pid_max.

> And I suspect that the single change of significance is to not check
> against the childmax value when deciding whether or not to look for and
> remove this pid from the list of saved termination status values.

Agreed - but is this still different to defining RECYCLES_PIDS then?

Thank you!
/haubi/



reply via email to

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