Bug report: Killing a native process may not actually kill it

Corinna Vinschen corinna-cygwin@cygwin.com
Wed Aug 28 20:33:00 GMT 2019


On Aug 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.

There is no POSIXy way to cleanly shutdown a process if that process
is a native Windows process since said process will not honor any
signal sent to it.

The only way to do that in Windows is to use some kind of IPC to
communicate to the foreign process that it's supposed to shutdown.  If
that process is a Cygwin process, that's handled via sending a signal.
If that process is a native process, Cygwin has no control over it.


Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20190828/096ce366/attachment.sig>


More information about the Cygwin mailing list