[ANNOUNCEMENT] TEST: Cygwin 3.0.0-0.4

Michael Haubenwallner michael.haubenwallner@ssi-schaefer.com
Wed Feb 6 09:54:00 GMT 2019


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
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/wait.html

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.

HTH,
/haubi/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pid-reuse-count.sh
Type: application/x-shellscript
Size: 483 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20190206/a5dd1df8/attachment.bin>
-------------- next part --------------

--
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


More information about the Cygwin mailing list