This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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

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

Attachment: signature.asc
Description: PGP signature

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]