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:subject:message-id:reply-to
	:references:mime-version:content-type:in-reply-to; q=dns; s=
	default; b=jFFhzFg3HI46tgvwdGnicZa/HXk6CkcY3IXS2hOrzzvmnliRtxr7s
	N5peAb5iBuj+R37Qwpwu1bwFebNsJHOgIrxovo80+V6XGxiehTzKZWHxrmh5eId4
	xh4cU5u66C5YxvqS9F/9r6kyULqJqyi9SU0BNRT19T8CJwfUYbtYy0=
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:subject:message-id:reply-to
	:references:mime-version:content-type:in-reply-to; s=default;
	 bh=7plwSEWOWrlhAfrS8oODmYy6Ah4=; b=VRZEx6LKmKupS14/Rif4rtHiDRB5
	klNa9R2ofQ7K4GrrvzDJvhYKK6eotzm4KG+GxsKPwlIOto/XBN7IDkHFeBuqw8CE
	MKcUyjWfn9Qj0+K8te4W2zD1NABYcCncPXRf/+fModVVAJgxF0luNkJDj6ZKgOHW
	FpSda0LJSyC0Z+s=
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-Virus-Found: No
X-Spam-SWARE-Status: No, score=-4.7 required=5.0 tests=AWL,BAYES_05,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2
X-HELO: calimero.vinschen.de
Date: Mon, 8 Jun 2015 14:09:39 +0200
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: cygwin-2 process handling (about SIGHUP)
Message-ID: <20150608120939.GB3005@calimero.vinschen.de>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <555B6F71.4040906@cornell.edu> <555B7E03.40404@cornell.edu> <20150521205357.2c125b3bcaf877d0843b52b1@nifty.ne.jp> <20150527122312.GF16927@calimero.vinschen.de> <20150527151734.GM16927@calimero.vinschen.de> <20150528114728.GA27014@calimero.vinschen.de> <20150528210932.3ffc9662998ff7ba9983990a@nifty.ne.jp> <20150528214409.269b5c2bc3eca9dbd888d032@nifty.ne.jp> <20150528141612.GD27014@calimero.vinschen.de> <20150607090329.da5f631aabbbe31a5309e526@nifty.ne.jp>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256;	protocol="application/pgp-signature"; boundary="b5gNqxB1S1yM7hjW"
Content-Disposition: inline
In-Reply-To: <20150607090329.da5f631aabbbe31a5309e526@nifty.ne.jp>
User-Agent: Mutt/1.5.23 (2014-03-12)

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

Hi Takashi,

On Jun  7 09:03, Takashi Yano wrote:
> Hi Corinna,
>=20
> On Thu, 28 May 2015 16:16:12 +0200 Corinna Vinschen wrote:
>=20
> > I applied this patch.  I'm not comfortable with removing the SIGHUP
> > handling from slave::read in favor of just setting errno to EIO.
> > EIO seems wrong here.  Not being able to access the pipe anymore
> > should be equivalent to a hangup.  Alternatively the return code
> > from the Windows function should be checked for ERROR_BROKEN_PIPE,
> > perhaps, but that introduces some more code,
>=20
> Regarding SIGHUP, I have a different thought.
> [...]
> To make the behaviour match with the test results on other
> systems, I have made a patch attached (cygwin.patch.20150604).
>=20
> With this patch, everything works nicely for me as well.
>=20
> Furthermore, with this patch, mc (midnight commander) becomes
> exiting normally. On cygwin 2.0.3-1, mc has a problem which
> leaves a subshell process on the background.
>=20
> To reproduce this problem, execute
> env SHELL=3D/bin/bash mc
> on cygwin 2.0.3-1, and type 'exit'.
>=20
> You will find bash process remains in background. I have confirmed
> this problem can be resolved by this patch.
>=20
> For the reason above, I think it is better to make the behaviour
> match with other systems as well as the POSIX specification.
>=20
> What do you think?

You convinced me.  I applied your patch.  I'll generate a developer
snapshot later today.  It would be nice if it could get a thorough
testing.


Thanks,
Corinna

--=20
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

--b5gNqxB1S1yM7hjW
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJVdYYDAAoJEPU2Bp2uRE+gA2UP/2cURuAd3TiNNgNMU/Mrox/M
Lv2u/7AZy/g6LEXq4cgePp63bXJRPS3CIY/37VPPlGm7YaJjElXXKHrSo1ZUuYzh
u5sWYf4WZP1ie5HvitjZLq/euTaR3YGqIWRIjctP/Ipe8b/kurN+fVIIAsfLKhIQ
hOJQuyZSvcxHQs1ioWXnPTiU48OVB6MY42iVBKSS0peFm6SztzJ5O64ah2neZHA2
/ypP0XtXqboEYWW7rgwGQ4O73JfG046416z5K+K0qd4B/pkXL/9VXpKae+E/nY8T
uqpWlR+3eavqAf/nByUvhK0LhnOWGysUF5tYzLpVRYbqV8lcm9aJtG8PEjyNfQh2
ivbpkrcjQfwCJYaDf/jyIJUjyd42S/PFX0qo7OzjrqKJJCreE4Ca10VNDTFl2A1p
hQMpm6dpiwFtZ4OnPyeuZVan6h+FKQ8ENBMW7bbcI2a9VReOQB/uk2wPvhlrixJk
Knu8aSEUMisBdxZbqnHuGY2nVZWHVUwOGwPBVn/ACegOOiRF24N1GQum44HE8M39
IaSRtASZTjYWst/J5PIhQF6lIlJNVeSmkorSBHPhuG3LCLPryAoT/iYX+uumHlpA
FoP6C5Y1S0kkvNLQfRcw5bMoqDjOQLvIUCBdK2UGveMvTU3mmqWDJStc87bQ4wjB
vBsdyg9EdT2iZrNC09y+
=E37E
-----END PGP SIGNATURE-----

--b5gNqxB1S1yM7hjW--
