X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Fri, 3 Apr 2009 11:10:03 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: execve issues, and execve with cygrunsrv Message-ID: <20090403091003.GI12738@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <49D0B0CD DOT 6050009 AT pocock DOT com DOT au> <20090331112427 DOT GC12738 AT calimero DOT vinschen DOT de> <49D4D802 DOT 8040005 AT pocock DOT com DOT au> <20090402160617 DOT GC12738 AT calimero DOT vinschen DOT de> <49D53676 DOT 8040208 AT pocock DOT com DOT au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <49D53676.8040208@pocock.com.au> User-Agent: Mutt/1.5.19 (2009-02-20) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: 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 On Apr 2 23:04, Daniel Pocock wrote: > cygrunsrv definitely stays running when I start gmond. It stops > immediately after the execve call - it thinks the process has stopped, > but in fact a new gmond is running with a new Windows PID. I am using > the -x option to cygrunsrv and the -f (foreground) and -p (pidfile) > options to gmond. Which PID does cygrunsrv look for? In the normal case w/o pidfile, Cygwin is calling waitpid on the child's Cygwin PID. In the pidfile case, cygrunsrv waits for the pidfile to be created and then fetches the Windows PID from /proc/$PID-FROM-FILE/winpid and waits for that PID using the Win32 call WaitForSingleObject. That could be your problem. If the process creates the pidfile before it actually execve's, then the correlation between the Cygwin PID and the Windows PID is differnt from the one after the execve call. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- 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/