delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/04/03/04:10:29

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 <corinna-cygwin AT cygwin DOT com>
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
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
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019