Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Message-ID: <cb51e2e05080608463b108669@mail.gmail.com>
Date: Sat, 6 Aug 2005 08:46:34 -0700
From: Joshua Daniel Franklin <joshuadfranklin@gmail.com>
To: cygwin@cygwin.com
Subject: Re: pid confusion and pstree
In-Reply-To: <Pine.LNX.4.62.0508041626100.25913@ns.pyerotechnics.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Disposition: inline
References: <Pine.LNX.4.62.0508041520500.25913@ns.pyerotechnics.com> 	 <Pine.GSO.4.61.0508041531470.3695@slinky.cs.nyu.edu> 	 <Pine.LNX.4.62.0508041538440.25913@ns.pyerotechnics.com> 	 <Pine.GSO.4.61.0508041617420.3695@slinky.cs.nyu.edu> 	 <Pine.LNX.4.62.0508041626100.25913@ns.pyerotechnics.com>
X-IsSubscribed: yes
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id j76FlCGl015956

On 8/4/05, Jason Pyeron wrote:
> hmmm? why are there zeros on the PGID, and why when using -W does PID
> change to WINPID? BUG?

Actually, I don't know if this is a bug or a documentation shortcoming.
From looking at the source, it looks like cygwin returns the same 
number for p->pid and p->dwProcessId when using CW_GETPINFO_FULL.
Shouldn't p->pid still be the Cygwin pid if it exists?

I tried looking at external.cc and it made my head hurt, but I *think* this
would do it (sorry, no time to build right now):

RCS file: /cvs/src/src/winsup/cygwin/external.cc,v
retrieving revision 1.77
diff -r1.77 external.cc
77c77,79
<         ep.pid = p->pid;
---
>         ep.pid = cygwin_pid (thispid);
>         if (!ep.pid)
>           ep.pid = p->pid;

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


