delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/08/06/11:47:21

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <cb51e2e05080608463b108669@mail.gmail.com>
Date: Sat, 6 Aug 2005 08:46:34 -0700
From: Joshua Daniel Franklin <joshuadfranklin AT gmail DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: pid confusion and pstree
In-Reply-To: <Pine.LNX.4.62.0508041626100.25913@ns.pyerotechnics.com>
Mime-Version: 1.0
References: <Pine DOT LNX DOT 4 DOT 62 DOT 0508041520500 DOT 25913 AT ns DOT pyerotechnics DOT com> <Pine DOT GSO DOT 4 DOT 61 DOT 0508041531470 DOT 3695 AT slinky DOT cs DOT nyu DOT edu> <Pine DOT LNX DOT 4 DOT 62 DOT 0508041538440 DOT 25913 AT ns DOT pyerotechnics DOT com> <Pine DOT GSO DOT 4 DOT 61 DOT 0508041617420 DOT 3695 AT slinky DOT cs DOT nyu DOT edu> <Pine DOT LNX DOT 4 DOT 62 DOT 0508041626100 DOT 25913 AT ns DOT pyerotechnics DOT com>
X-IsSubscribed: yes
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/


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019