public inbox for cygwin-talk@cygwin.com
 help / color / mirror / Atom feed
From: Christopher Faylor <cgf-use-the-mailinglist-please@cygwin.com>
To: The Vulgar and Unprofessional Cygwin-Talk List <cygwin-talk@cygwin.com>
Subject: Re: Design mixed 32 and 64 bit systems.
Date: Mon, 02 Dec 2013 21:07:00 -0000	[thread overview]
Message-ID: <20131202210551.GA2497@ednor.casa.cgf.cx> (raw)
In-Reply-To: <529CEDE5.4030703@etr-usa.com>

On Mon, Dec 02, 2013 at 01:30:29PM -0700, Warren Young wrote:
>On 12/2/2013 12:56, Christopher Faylor wrote:
>> On Mon, Dec 02, 2013 at 12:35:00PM -0700, Warren Young wrote:
>>> This happens because POSIX PIDs are in a table that lives in
>>> cygwin1.dll's memory space, and because there are two DLLs, there are
>>> two different PID tables.
>>
>> Actually POSIX pids are Windows PIDs.  The distinction becomes fuzzy
>> after an exec, though, where the Cygwin PID continues to be the PID
>> of the process which previously exec'ed it.
>
>Of the four PID values this pair of programs prints, shouldn't at least 
>two should be the same, then?  I get four different values here:
>
>PARENT: My PID is 5048; created child PID 5684
>CHILD:  My PID is 3108; my parent's PID is 1.

The parent pid *is* a cygwin invention (although technically it doesn't
have to be).  When executed between different architectures you lose the
parent/child linkage, since as you say, the DLL in the execed process
thinks it's being started from a non-cygwin windows program.

It's a subtle distinction but there is no real table of Cygwin pids
maintained by the DLL.  Each process has a shared memory region
associated with it that holds information like the parent pid.  This
shared memory region is not recognized between x86/x86_64.

cgf

  parent reply	other threads:[~2013-12-02 21:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-27 20:13 Buchbinder, Barry (NIH/NIAID) [E]
2013-11-27 22:17 ` JonY
2013-11-27 22:27   ` Christopher Faylor
2013-12-02 19:35 ` Warren Young
2013-12-02 19:56   ` Christopher Faylor
2013-12-02 20:30     ` Warren Young
2013-12-02 20:44       ` Warren Young
2013-12-02 21:07       ` Christopher Faylor [this message]
2013-12-17 20:41         ` Christopher Faylor

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=20131202210551.GA2497@ednor.casa.cgf.cx \
    --to=cgf-use-the-mailinglist-please@cygwin.com \
    --cc=cygwin-talk@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).