delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2019/08/28/16:34:25

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:to:subject:mime-version:content-type
:content-transfer-encoding:date:from:in-reply-to:references
:message-id; q=dns; s=default; b=hzwNH2kGjunQJXl4VVKznSuc6+AQo02
945wwOTvv/UVGLRWc78CWaVnWEBLCIvMPxhk6SOkTU4vcrp638b5L7M/dK68+n50
OgeoQpWnRYJV5+r9WE2pi4grapMjbky5zXv9YALglb7SKIjEIN5zWnTzokHBGf7d
ie8Hd8+nAAmk=
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:to:subject:mime-version:content-type
:content-transfer-encoding:date:from:in-reply-to:references
:message-id; s=default; bh=7B0mTKjB7BFRkacKqhrO0cDuN1U=; b=icsZf
jLBfYI2Qpsf10x88a4Esm1ZNonA5hwxYESaLlcODjvjnhTxAE97K5IgyHo89RCVx
xI8dF8p7Gf8nd47vFovrhzkxEbcVvNsg22cfPTVyPEWw7QgZejlAt/3nOziqY6RL
5584rIqcwGznIbRcDxWL8S6RzgUvAXjCKcBPmk=
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-Spam-SWARE-Status: No, score=-1.2 required=5.0 tests=BAYES_00,FROM_STARTS_WITH_NUMS,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=no version=3.3.1 spammy=H*u:0.9.2, H*UA:0.9.2, HX-Languages-Length:1115, hear
X-HELO: smtp-out-no.shaw.ca
To: cygwin AT cygwin DOT com
Subject: Re: Bug report: Killing a native process may not actually kill it
MIME-Version: 1.0
Date: Wed, 28 Aug 2019 13:33:25 -0700
From: Kaz Kylheku <920-082-4242 AT kylheku DOT com>
In-Reply-To: <A144BE6484AF1CE6C124CD92@[192.168.1.144]>
References: <D2D1E09243A3854178C12845@[192.168.1.39]> <DA9B3D3B0A3DE3E5A4720981@[192.168.1.144]> <20190828154553 DOT GQ11632 AT calimero DOT vinschen DOT de> <A144BE6484AF1CE6C124CD92@[192.168.1.144]>
Message-ID: <893c47a5235335c035a83536ab3cd899@mail.kylheku.com>
X-Sender: 920-082-4242 AT kylheku DOT com
User-Agent: Roundcube Webmail/0.9.2
X-IsSubscribed: yes
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id x7SKY7gQ000896

On 2019-08-28 08:59, Quanah Gibson-Mount wrote:
> --On Wednesday, August 28, 2019 6:45 PM +0200 Corinna Vinschen
> <corinna-cygwin AT cygwin DOT com> wrote:
> 
>> Not likely.  Cygwin handles Ctrl-C by generating SIGINT.  This only
>> works reliably with Cygwin processes.  There's
>> 
>>   $ /bin/kill -f <PID>
>> 
>> to call the Win32 function TerminateProcess(pid) on a non-Cygwin
>> process or an unresponsive Cygwin process.
> 
> As I noted, it was not unique to control-C.  In any case, unfortunate
> to hear that Cygwin will not address this issue.  kill -f is clearly
> not desirable for doing a clean shutdown of a process.

Cygwin can't introduce Unix-like shutdown mechanisms (like the
handling a non-fatal signal) into non-Cygwin processes which have
no concept of that. It makes no sense.

The Windows way to try to try to obtain a clean shutdown is to send a
message to a window handle (WM_CLOSE or WM_QUIT or whatever); then
if that fails, TerminateProcess rudely.

kill shouldn't try to translate signals to window handle messages;
it makes no sense.



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