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
From: "Dave Korn" <dk@artimi.com>
To: <cygwin@cygwin.com>
Subject: RE: howto register process
Date: Thu, 11 Nov 2004 13:13:51 -0000
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
In-Reply-To: <87mzxoveei.fsf@zlatenlist.homelinux.net>
Message-ID: <NUTMEGadVe5HXC9xubf00000688@NUTMEG.CAM.ARTIMI.COM>
X-OriginalArrivalTime: 11 Nov 2004 13:13:51.0890 (UTC) FILETIME=[49E2DF20:01C4C7F0]

> -----Original Message-----
> From: cygwin-owner On Behalf Of Kamen TOMOV
> Sent: 11 November 2004 11:01
> To: cygwin
> Subject: howto register process
> 
> Hi,
> 
> I have an application that is created to work on Unix but it is
> supposed to run on Windows as well. The problem is that we have a
> daemon that spawns a few children and later it needs to kill them. The
> parent process is supposed to communicate with its children by signals
> and to eventually terminate them. I would like to use kill(pid,
> signal) to kill the processes because they rely on the signals
> mechanizm. 
> 
> The problem is that kill returns "not such pid". Is there a way to
> register a process in the cygwin process table so that later be able
> to kill it with kill()? TIA.

  You can't kill a windows process with cygwin kill.  Presumably your software
is using the windows native functions to spawn child processes?  That's not
necessary: cygwin gives you unix syscalls on windows.  If you used the standard
posix functions (fork/exec/etc) to start the children, kill would work fine on
them, and you'd have a lot more common code and a lot less differences to keep
track of between your unix and 'doze versions of your code.

    cheers, 
      DaveK
-- 
Can't think of a witty .sigline today....


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

