X-Recipient: archive-cygwin@delorie.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:date:from:to:cc:subject:message-id:reply-to
	:references:mime-version:content-type:in-reply-to; q=dns; s=
	default; b=pqXn5+HX8mhmo3Uw9msczwd4jw+qDv1M/XZsM4oLQPQErZXybaT/D
	vX97x5in7ud/v8Yn65n9yC9lSB5kFxQ+ptJ+VtM864W75Jah3E7WZfnZL4DzAqMS
	DpgKlTYRSCBFqVItgWUCfITbm6MD9x3BSqBq8TnhSsgnYaXDLeWdO4=
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:date:from:to:cc:subject:message-id:reply-to
	:references:mime-version:content-type:in-reply-to; s=default;
	 bh=Q0ndt5RX+ha2qAqH2qzcELvRJNw=; b=iQk6PZAlYxWYwqwmf/1V6XAFwBUL
	yKZhEnrJmIkkDPEMxFG3EJURX1Do+c/1UgGA5h1KFzKXroXDpg0crlYjw3YeL5qo
	plhm7IIwd29g7T7IUoZbCFMSc4sGLNBnSPzzNXfzrsvw6EzmeLFh0hGArorDkN51
	mIzNrrJh0QxF00k=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=-103.3 required=5.0 tests=AWL,BAYES_00,GOOD_FROM_CORINNA_CYGWIN,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=foreign, hear
X-HELO: mout.kundenserver.de
Date: Wed, 28 Aug 2019 18:13:56 +0200
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: Quanah Gibson-Mount <quanah@symas.com>
Cc: cygwin@cygwin.com
Subject: Re: Bug report: Killing a native process may not actually kill it
Message-ID: <20190828161356.GT11632@calimero.vinschen.de>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: Quanah Gibson-Mount <quanah@symas.com>, cygwin@cygwin.com
References: <D2D1E09243A3854178C12845@[192.168.1.39]> <DA9B3D3B0A3DE3E5A4720981@[192.168.1.144]> <20190828154553.GQ11632@calimero.vinschen.de> <A144BE6484AF1CE6C124CD92@[192.168.1.144]>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256;	protocol="application/pgp-signature"; boundary="hZmpNjgL9fMFo2cm"
Content-Disposition: inline
In-Reply-To: <A144BE6484AF1CE6C124CD92@[192.168.1.144]>
User-Agent: Mutt/1.11.3 (2019-02-01)

--hZmpNjgL9fMFo2cm
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Aug 28 08:59, Quanah Gibson-Mount wrote:
>=20
>=20
> --On Wednesday, August 28, 2019 6:45 PM +0200 Corinna Vinschen
> <corinna-cygwin@cygwin.com> wrote:
>=20
> > Not likely.  Cygwin handles Ctrl-C by generating SIGINT.  This only
> > works reliably with Cygwin processes.  There's
> >=20
> >   $ /bin/kill -f <PID>
> >=20
> > to call the Win32 function TerminateProcess(pid) on a non-Cygwin
> > process or an unresponsive Cygwin process.
>=20
> 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

--=20
Corinna Vinschen
Cygwin Maintainer

--hZmpNjgL9fMFo2cm
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEoVYPmneWZnwT6kwF9TYGna5ET6AFAl1mqEQACgkQ9TYGna5E
T6BdVBAAhAsMLVBVceCXNl/cWBxKrRPQYtX/WSSk3g+utRxqpcB70RN6T0KP/kFP
J+YfPvd4PnW3D/17limiqQR+JsjexnXk2ttMNlKLAfdpSoA/nS7x+qHlp4CRNfCx
SaN7oyQITfVFUyJDgDStFlEs948Da0gPjMoKsXvgjjAl0mZjn/rAZdLTduUEqHby
NBUNFAvphAbu+g4OBczLpC0w5dK4iJGyMhuc+hiQDhwo7YETvHQhvZycJN+iNS2T
6hy2bLHOlZUGIKQmqwL2inMob4puL3/RQEcx2k3Yw5SI3ghoudzVsEfB+lXvMhgN
YS/MNYZQNAsXQMRj9rfx7gUQ3fXcI+Hw+UCXKFjOfUojpQ13ybxEQTnCyJp4FKC/
q7RpVN3AzIs6Yf5KDhw5oAnN54Lx8mhch/Z2ilON3myMARS+FUY0Sl4kKHcSroi5
FStfDXrekKGO7QEYMxDnmilVAGnIhPzMF9r8LF9UHLMhNkX3PRWnSP6DnTa3jVMu
OcEq9KFeTl4vip1JFTVsZgDZaq4LUGKcg2CP3MVPzqHFZMPZldhyVrjCXYNMGcba
fLvJFOQy3uqFgZV48HUFVh7FRY/L+HXsl/2sppSvOeDW9X3Sgz90B231VGFyX6Px
+dUAazNOywWQoiKb0OT1HgB2rdrI3cpGXgM6q8bwNAE6KzKbEGo=
=AaKM
-----END PGP SIGNATURE-----

--hZmpNjgL9fMFo2cm--
