Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Date: Wed, 3 Oct 2001 11:11:16 -0400 From: Christopher Faylor To: cygwin AT cygwin DOT com Cc: robert_legros AT yahoo DOT com Subject: Re: 1.3.3-2: ps.exe bug for processes with a zero ppid Message-ID: <20011003111116.G28936@redhat.com> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com, robert_legros AT yahoo DOT com References: <20011003125358 DOT 52168 DOT qmail AT web11501 DOT mail DOT yahoo DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20011003125358.52168.qmail@web11501.mail.yahoo.com> User-Agent: Mutt/1.3.21i 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" >. > >'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 -- 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/