Web lists-archives.com

Re: [ANNOUNCEMENT] TEST: Cygwin 3.0.0-0.4

Hi Andrey,

while not being involved with this change, I may provide some background though:

On 2/6/19 1:36 AM, Andrey Repin wrote:
> Greetings, Corinna Vinschen!
>> Changes from 3.0.0-0.3:
>> - Cygwin PIDs have been decoupled from Windows PID.  Cygwin PIDs are
>>   now incrementally dealt in the range from 2 up to 65535, POSIX-like.
> I don't quite get it.
> What's the rationale? Why not just use system PID's?

To some degree, Cygwin PIDs already have been decoupled from Windows PIDs before.
For example, with POSIX exec() the new process needs to have the same POSIX PID,
but Cygwin does have to create a new Windows process here, so the Windows PID
cannot be used as the POSIX PID within the new process.

Another topic here is PID reusage: A POSIX shell is required to be able to 'wait'
for at least CHILD_MAX unique immediate children processes, as described in

Cygwin does define CHILD_MAX to be 256, so immediate children should not reuse
a process ID from one of the last 256 wait()ed immediate children processes.

Attached is a bash script to test for when children PIDs get reused.


Attachment: pid-reuse-count.sh
Description: application/shellscript

Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple