Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Thu, 15 Sep 2005 09:18:10 -0700 (PDT) From: Eduardo Chappa To: cygwin AT cygwin DOT com Subject: Re: problem with getppid() In-Reply-To: <20050915153358.GW5555@calimero.vinschen.de> Message-ID: References: <20050915153358 DOT GW5555 AT calimero DOT vinschen DOT de> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Antivirus: Scanned by Vexira Antivirus 1.1.1 X-IsSubscribed: yes *** Corinna Vinschen (pcorinna-cygwin AT cygwin DOT cometh) wrote in the cygwin...: :) > The output is "My parent is bad". I believe this is a bug in Cygwin's :) > implementation of getppid(). :) :) No, it's not a bug. GDB starts the inferior process using the standard :) Windows mechanisms since it should be useful also for native debugging. :) When the inferior process is not started by Cygwin's own fork/exec :) process, the child process doesn't know anything about its parent :) process, at least not on Windows 9x. There's a way to retrieve the :) native parent PID by using NtQueryInformationProcess on NT, but it :) doesn't seem very useful to get this information. Dear Corinna, Thank you for your fast response. Now I understand the issue that is involved. I have had this problem runing Pine in Cygwin. I've tried this in Windows 2000 Pro and Windows XP Pro. The same issue is not present in Linux, where I get the "expected" behavior. The manual of getppid makes me believe that the correct behavior for getppid is to return gdb's pid in the "bad" behavior, and since it is documented that getppid is supported in Cygwin, I would expect it to behave that way. The problem I have is that when Pine gets ppid == 1 it exits, and this is checked after a timeout for a select() command, which makes it very hard to debug pine under gdb. It would be great if I did not have to modify the source code of Pine to get around this problem. I can work around this at this moment, but I'd rather not have to modify Pine to work around this. From your response it seems that you are not willing to "fix" this problem. If that is the case, simply confirm this, and I will understand, otherwise it would be great if this were corrected in a future release and I would appreciate this a lot. Thank you for your consideration! -- Eduardo http://www.math.washington.edu/~chappa/pine/ -- 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/