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

Christopher Faylor cygwin@cygwin.com
Thu Oct 4 11:43:00 GMT 2001


On Thu, Oct 04, 2001 at 01:39:22AM -0700, Robert Legros wrote:
>--- Christopher Faylor <cgf@redhat.com> wrote:
>>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.
>[snip]
>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.

Three points:  1) Even as a hack your patch is wrong since it will skip
valid cygwin apps  2) I tried to fix this yesterday.  It should work
correctly in the lastest snapshot 3) I don't put inappropriate hacks
in utilities to work around bugs in the DLL.

This is the point that I was trying to make.  While I applaud the fact
that you actually thought to look at the code for a solution to your
problem, you just looked to the wrong code.  It may be harder to debug
cygwin1.dll but that does not mean that a correct solution is ever to
patch something else just because it is simpler.

cgf

--
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/



More information about the Cygwin mailing list