This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: 1.3.3-2: ps.exe bug for processes with a zero ppid


--- Christopher Faylor <cgf@redhat.com> wrote:
> On Wed, Oct 03, 2001 at 05:53:58AM -0700, Robert
> Legros wrote:
> >There is a follow up to the bug "1.3.3-2: Process
> creation is possible
> >with ppid = 0 and pgid = 0"
>
><http://cygwin.com/ml/cygwin/2001-10/msg00109.html>.
> >
> >'ps.exe' does not behave correctly with such
> processes.  This is due to
> >the fact that in the code, there is a criteria to
> see if a process is a
> >Cygwin one or a Windows one.  And that criteria is
> precisely (p-ppid !=
> >0) !.
> >
> >I have written a patch for 'ps.exe'.  It is more a
> hack than a real bug
> >correction, but it works.  In fact the real bug
> correction must be done
> >somewhere in the process creation routines inside
> 'cygwin1.dll'.  This
> >patch is to be found in attachment.
> 
> You've hit the nail on the head.  This is a hack. 
> If the linux kernel
> started setting pgids to 0, you would fix the linux
> kernel.  You wouldn't
> fix 'ps'.
> 
> If ps is assuming that a pgid == 0 is not a cygwin
> process then obviously
> something is screwed up somewhere.  So, the fix is
> in cygwin1.dll not
> ps.
> 
> cgf

OK, it is a hack. But with version 1.3.3-2, the hack
does work. 'ps.exe' does again behaves correctly.

I do have a problem. Here, at work, there are a few
packages (shell scripts) running. They are part of an
important B-to-B system. Up to now it was running with
Cygwin version 1.1.4 and all its packages as from 29
Sep 2000. The system does work in production for more
than a year now.

In that version (1.1.4), process creation gave correct
PPID's and PGID's. And so 'ps.exe' did behave
correctly.

I should like to upgrade the OS platform. That is
upgrading from Windows NT to Windows 2000 and
upgrading from Cygwin 1.1.4 to its current version.

* BUT IT HAS TO WORK *

Now it does not work anymore. Let's call it
regression.

So, may I ask you to get some insight into both
problems ( "1.3.3-2: Process creation is possible with
ppid = 0 and pgid = 0"
<http://cygwin.com/ml/cygwin/2001-10/msg00109.html>
and "1.3.3-2: ps.exe bug for processes with a zero
ppid" 
<http://cygwin.com/ml/cygwin/2001-10/msg00121.html> ).
If the first may not be solved directly, is it
possible to apply the patch to 'ps.exe' as to, at
least, have an OS platform working coherently.

It should be nice if it could be done within version
1.3.4. I don't like (nor you, probably) leave patches
in a production system.

By the way, if it is possible for me to debug such a
program as 'ps.exe', it is more difficult to make a
correction to 'cygwin1.dll' and to rebuild it.

Thanks in advance,


=====
Robert Legros
south Brussels, Belgium
robert_legros@yahoo.com

__________________________________________________
Do You Yahoo!?
NEW from Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]