delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2013/10/30/09:00:20

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:message-id:date:from:mime-version:to:subject
:references:in-reply-to:content-type:content-transfer-encoding;
q=dns; s=default; b=oA5iJmbViZZ3ooME1KPaA88xJYhW1+bOycnPvELl375
LJA5HMa+RfI0OeRc5kaMntKiCC5IhpnD2+7FSgGNMQMmlFi9pvJgsOfA9aa32A+1
1LpsyecKrL1iUTRyWOT/bfvukaV+cC2rewyIlGgBYC2MBjrXpJFgBbUxPtuN+eak
=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:message-id:date:from:mime-version:to:subject
:references:in-reply-to:content-type:content-transfer-encoding;
s=default; bh=TacN5s7g1oXTJJgF7evhNk8RAmI=; b=de07up4qld4xKiWyb
LRSe/Ody2Jhsrj3HOruaP3zI6uuQj4J2XC1lXzCTTwgZcywkZ+PQ/ko+OGW3+o+L
ku2RUHO+YkuLA5ch69PAVi9Uam1a91QlJa20KVAiSKwpunSOiLSdC4GMFXvkcyWk
BfPRzWAjjkS7vnQmHApfnpoes8=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.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
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2
X-HELO: out4-smtp.messagingengine.com
Message-ID: <527102C3.7080104@cwilson.fastmail.fm>
Date: Wed, 30 Oct 2013 08:59:47 -0400
From: Charles Wilson <cygwin AT cwilson DOT fastmail DOT fm>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.0.1
MIME-Version: 1.0
To: The Cygwin Mailing List <cygwin AT cygwin DOT com>
Subject: Re: SIGKILL and TerminateProcess
References: <5F8AAC04F9616747BC4CC0E803D5907D0C40AFEB AT MLBXv04 DOT nih DOT gov> <20131029172205 DOT GA1433 AT ednor DOT casa DOT cgf DOT cx> <5F8AAC04F9616747BC4CC0E803D5907D0C40B0C6 AT MLBXv04 DOT nih DOT gov> <20131029192154 DOT GB5787 AT ednor DOT casa DOT cgf DOT cx>
In-Reply-To: <20131029192154.GB5787@ednor.casa.cgf.cx>

On 10/29/2013 3:21 PM, Christopher Faylor wrote:
> On Tue, Oct 29, 2013 at 06:37:46PM +0000, Lavrentiev, Anton (NIH/NLM/NCBI) [C] wrote:
>> CYGWIN lets me access some Windows-specific APIs (the same way one
>> would do by using some UNIX-flavor-specific libraries), without having
>> to port them all to CYGWIN first.  Such code becomes a real problem in
>> pipelining because it cannot be reliably managed from other processes
>> (which would all require modifications to do TerminateProcess tricks
>> throughout; or use the special CYGWIN command-like utility) where just
>> kill(9) would have been sufficient..
>
> To be a broken record: The whole point of Cygwin is to run UNIX based
> programs on Windows.  Asking for the addition of special-case code so
> that people can use Windows functions in their programs completely
> misses the point of this project.
>
> That said, however, the Cygwin "kill" command does have a "-f" option
> which forces the termination of a process if it can't be killed with
> Cygwin's signal mechanism (I added it so that I could kill processes
> that were hung while I was working on Cygwin's signal code).  If it is
> essential that you be able to summarily terminate Windows programs then
> use that.

What cgf said. However, there is a "cygwin" API you could add, which 
allows to programatically do "TerminateProcess" the "correct way" so 
that (cygwin) pipelines and such Do The Right Thing:

http://cygwin.com/ml/cygwin-patches/2009-q4/msg00028.html

Don't know if this will help in your situation, but I figured it should 
be mentioned.

--
Chuck


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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