This is the mail archive of the
mailing list for the Cygwin project.
Re: Bug report: Killing a native process may not actually kill it
- From: Kaz Kylheku <920-082-4242 at kylheku dot com>
- To: cygwin at cygwin dot com
- Date: Wed, 28 Aug 2019 13:33:25 -0700
- Subject: Re: Bug report: Killing a native process may not actually kill it
- References: <D2D1E09243A3854178C12845@[192.168.1.39]> <DA9B3D3B0A3DE3E5A4720981@[192.168.1.144]> <20190828154553.GQ11632@calimero.vinschen.de> <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
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
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple