public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com>
To: cygwin@cygwin.com
Subject: Re: [ANNOUNCEMENT] TEST: Cygwin 3.0.0-0.4
Date: Wed, 06 Feb 2019 09:54:00 -0000	[thread overview]
Message-ID: <bb2a0e5f-72ea-a122-cd9a-2c7d1494b500@ssi-schaefer.com> (raw)
In-Reply-To: <1044696418.20190206033644@yandex.ru>

[-- Attachment #1: Type: text/plain, Size: 1191 bytes --]

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/

[-- Attachment #2: pid-reuse-count.sh --]
[-- Type: application/x-shellscript, Size: 483 bytes --]

[-- Attachment #3: Type: text/plain, Size: 219 bytes --]


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

      parent reply	other threads:[~2019-02-06  9:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-01 19:37 Corinna Vinschen
2019-02-06  0:31 ` L A Walsh
2019-02-06  9:02   ` Corinna Vinschen
2019-02-06  0:50 ` [ANNOUNCEMENT] " Andrey Repin
2019-02-06  9:03   ` Corinna Vinschen
2019-02-06  9:54   ` Michael Haubenwallner [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bb2a0e5f-72ea-a122-cd9a-2c7d1494b500@ssi-schaefer.com \
    --to=michael.haubenwallner@ssi-schaefer.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).