This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: pid confusion and pstree
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/