From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25108 invoked by alias); 2 Dec 2013 21:07:11 -0000 Mailing-List: contact cygwin-talk-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: cygwin-talk-owner@cygwin.com Reply-To: The Vulgar and Unprofessional Cygwin-Talk List Mail-Followup-To: cygwin-talk@cygwin.com Received: (qmail 25098 invoked by uid 89); 2 Dec 2013 21:07:10 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.7 required=5.0 tests=AWL,BAYES_05,RDNS_NONE autolearn=no version=3.3.2 X-HELO: mho-02-ewr.mailhop.org Received: from Unknown (HELO mho-02-ewr.mailhop.org) (204.13.248.72) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Mon, 02 Dec 2013 21:06:00 +0000 Received: from pool-71-126-240-25.bstnma.fios.verizon.net ([71.126.240.25] helo=cgf.cx) by mho-02-ewr.mailhop.org with esmtpa (Exim 4.72) (envelope-from ) id 1Vnagi-0009FJ-Gz for cygwin-talk@cygwin.com; Mon, 02 Dec 2013 21:05:52 +0000 Received: from cgf.cx (ednor.casa.cgf.cx [192.168.187.5]) by cgf.cx (Postfix) with ESMTP id 7BE9460125 for ; Mon, 2 Dec 2013 16:05:51 -0500 (EST) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX18bwulZIfxuncXUtInXJa8x Date: Mon, 02 Dec 2013 21:07:00 -0000 From: Christopher Faylor To: The Vulgar and Unprofessional Cygwin-Talk List Subject: Re: Design mixed 32 and 64 bit systems. Message-ID: <20131202210551.GA2497@ednor.casa.cgf.cx> Reply-To: cygwin-talk@cygwin.com Mail-Followup-To: The Vulgar and Unprofessional Cygwin-Talk List References: <6CF2FC1279D0844C9357664DC5A08BA21D7054@MLBXV06.nih.gov> <529CE0E4.4080804@etr-usa.com> <20131202195626.GC604@ednor.casa.cgf.cx> <529CEDE5.4030703@etr-usa.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <529CEDE5.4030703@etr-usa.com> User-Agent: Mutt/1.5.20 (2009-06-14) X-SW-Source: 2013-q4/txt/msg00016.txt.bz2 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