delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/11/12/10:00:17

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
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
Date: Fri, 12 Nov 2004 10:00:07 -0500
From: Christopher Faylor <cgf-no-personal-reply-please AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: howto register process
Message-ID: <20041112150007.GC26737@trixie.casa.cgf.cx>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <873bzfdyvh DOT fsf AT zlatenlist DOT homelinux DOT net> <NUTMEG0ApIWXzNbrDYs000006c2 AT NUTMEG DOT CAM DOT ARTIMI DOT COM>
Mime-Version: 1.0
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/

- Raw text -


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