Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Date: Fri, 12 Nov 2004 10:00:07 -0500
From: Christopher Faylor <cgf-no-personal-reply-please@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: howto register process
Message-ID: <20041112150007.GC26737@trixie.casa.cgf.cx>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <873bzfdyvh.fsf@zlatenlist.homelinux.net> <NUTMEG0ApIWXzNbrDYs000006c2@NUTMEG.CAM.ARTIMI.COM>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <NUTMEG0ApIWXzNbrDYs000006c2@NUTMEG.CAM.ARTIMI.COM>
User-Agent: Mutt/1.4.1i

On Fri, Nov 12, 2004 at 01:53:35PM -0000, Dave Korn wrote:
>> -----Original Message-----
>> From: cygwin-owner On Behalf Of Kamen TOMOV
>> Sent: 12 November 2004 12:40
>
>> On Fri, Nov 12 2004, Brian Dessent wrote:
>> 
>> > Kamen TOMOV wrote:
>> > 
>> > > The parent process is started as a windows server. Then it
>> > > executes cygwin's fork. When I try to kill any of these with
>> > > kill() it returns "No such pid".
>> > 
>> > Are you sure you're not confusing Cygwin PIDs with Win32 PIDs?  In
>> > order to make the fork() magic work, Cygwin maintains its own PIDs
>> > in parallel to the actual windows PID.  All the Cygwin functions
>> > ...
>> 
>> Thanks Brian. Yes I am sure I'm not confusing them. I tryed a function
>> that is part of the cygwin's API. It is called cygwin_winpid_to_pid to
>> get the cygwin's PID but it returns -1 on pids which does not
>> correspond to a cygwin pid.
>
>  Waittaminnit.  You're saying that the spawned processes _aren't_ cygwin
>processes?

If the execed process is not a cygwin process a cygwin "stub" should
stick around which tries to make it look like a real cygwin process.  If
you are using cygwin's fork/exec/spawn you should never need to
cygwin_winpid_to_pid.

cgf

--
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/

