public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Kaz Kylheku <920-082-4242@kylheku.com>
To: cygwin@cygwin.com
Subject: Re: Bug report: Killing a native process may not actually kill it
Date: Wed, 28 Aug 2019 22:43:00 -0000	[thread overview]
Message-ID: <893c47a5235335c035a83536ab3cd899@mail.kylheku.com> (raw)
In-Reply-To: <A144BE6484AF1CE6C124CD92@[192.168.1.144]>

On 2019-08-28 08:59, Quanah Gibson-Mount wrote:
> --On Wednesday, August 28, 2019 6:45 PM +0200 Corinna Vinschen
> <corinna-cygwin@cygwin.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

  parent reply	other threads:[~2019-08-28 20:33 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-25 17:32 Quanah Gibson-Mount
2019-07-25 18:30 ` openldap on Cygwin (was: Bug report: Killing a native process may not actually kill it) Achim Gratz
2019-07-25 19:04   ` openldap on Cygwin Quanah Gibson-Mount
2019-08-28 15:46 ` Bug report: Killing a native process may not actually kill it Quanah Gibson-Mount
2019-08-28 15:59   ` Corinna Vinschen
2019-08-28 16:02     ` Quanah Gibson-Mount
2019-08-28 20:33       ` Corinna Vinschen
2019-08-28 22:43       ` Kaz Kylheku [this message]
2019-08-29  0:02         ` Quanah Gibson-Mount
2019-08-29  1:01           ` Steven Penny
2019-09-03  5:38             ` Ray Donnelly

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=893c47a5235335c035a83536ab3cd899@mail.kylheku.com \
    --to=920-082-4242@kylheku.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).