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 10:08:22 -0700 (PDT) From: Eduardo Chappa To: cygwin AT cygwin DOT com Subject: Re: problem with getppid() In-Reply-To: <20050915165446.GC5395@calimero.vinschen.de> Message-ID: References: <20050915153358 DOT GW5555 AT calimero DOT vinschen DOT de> <20050915165446 DOT GC5395 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...: :) On Sep 15 09:18, Eduardo Chappa wrote: :) > The problem I have is that when Pine gets ppid == 1 it exits [...] :) :) That's a bug in pine. It means, you can't run pine from cmd.exe, resp. :) command.com. Corinna, I can run Pine in cmd.exe, I have no problem with that. Let me give you and idea of the code. res = select() if(res == 0){ if(getppid() == 1) "exit(0)"; continue doing its stuff; } This code runs perfectly in Linux, both in terminal and under gdb, and it runs very well in Cygwin, but as you point out it does not run under cmd.exe. It is not a problem that it does not run in the latter case because one can run it under cygwin on a bash shell, so the latter is not an issue that is specially troubling. The real issue is that I get an "exit(0)" under gdb. That's my real issue. That's what I'd like to solve. From what I read in an earlier message from you, it seems like there is a way to fix the problem I have, and if it is possible to fix it, I would be grateful if it was fixed. I suppose that even though you explained where the problem is, that you can appreciate that getppid is not behaving correctly in the situation I described before. Of course it may be important for someone to be able to run Pine in cmd.exe, but a good workaround to that exists. I do not have a good workaround, hence my request. I hope you appreciate my point and what I am requesting. Thank you, -- 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/