Mail Archives: cygwin/2005/05/17/23:02:29
Reini:
[Note, I'm no Cygwin expert, so please correct any misunderstandings.]
> >>or fix it in this module XS. It's really easy with the cygwin provided
> >>translation functions.
> >> See http://sourceware.org/ml/cygwin/2005-02/msg00154.html
...
> > After all, Proc::ProcessTable misreports the PID and
> > PPID only under certain conditions -- this would indicate a complex
> issue in
> > Proc::ProcessTable XS code, right?
>
> No. Just the translation is needed, but one has to specify somehow which
> pid's he wants. The cygwin pid's or the winpid's.
> Both have their merits and usecases.
Why are two usecases needed? The code that builds the process table
(returned by Proc::ProcessTable->table) should return the same PID and PPID
that 'ps' reports - no exceptions - right?
I had a look in Proc::ProcessTable's .xs and os/cygwin.c. There seem to be a
problem with the process table data returned by this code in the
OS_get_table() function:
This defines an internal Cygwin query to return process information:
cygwin_getinfo_types query = CW_GETPINFO_FULL;
This executes the query within a for loop:
p = (external_pinfo *) cygwin_internal (query, pid | CW_NEXTPID);
From what I gather, the root problem is that for some processes (as
demonstrated by my testcase script), the CW_GETPINFO_FULL query returns:
1. Invalid PPIDs
2. WINPID instead of Cygwin PID.
How will the translation functions you mentioned solve these two problems?
Cheers,
Sonam
--
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 -