X-Recipient: archive-cygwin AT delorie DOT 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=Hj6Zg7CnKqeItmyrF26Rqu+7u4WMzx/3GUhDWpRg13puSpNGfVXfA wSjKBrh0EtM6l1VPWea2ZoGlGaGxjH67eDSKN9QVvbVfFEk1QYrTScPlQ+AQ//d8 KwZZdwAvWvXwdhTGwok605bbVPZ15RKieI/86k7zXiZH/k8d35Q8UU= 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=udXDfK+/lmoofHK0HKpwgp3jyV4=; b=LzMPpoZ7z/U6ddQhhi9/844qL4zW T215gOC2wPldFNQRbJQeTJKdQTdd0XH8sswGRDaRnomlN/tqMedykkjI6X/wKulk FgFirj7zI2WskUrDiGQ+3mXcUZby5ZteeO55TQLMIxGy1GexVufFmYHdQaXic1D8 SKDCNDHiJtMMK2w= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-5.9 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: calimero.vinschen.de Date: Mon, 9 Mar 2015 10:12:49 +0100 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: PTY dies when master in parent process is closed. Message-ID: <20150309091249.GB28200@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <20150305215323 DOT 760df4752fdbd6f19a931851 AT nifty DOT ne DOT jp> <20150305133100 DOT GY3213 AT calimero DOT vinschen DOT de> <20150305135839 DOT GZ3213 AT calimero DOT vinschen DOT de> <20150306200710 DOT 1264a46aa8dd633943e56212 AT nifty DOT ne DOT jp> <20150308163759 DOT 9d3eacd5f3b168a1515a6bc2 AT nifty DOT ne DOT jp> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="tsOsTdHNUZQcU9Ye" Content-Disposition: inline In-Reply-To: <20150308163759.9d3eacd5f3b168a1515a6bc2@nifty.ne.jp> User-Agent: Mutt/1.5.23 (2014-03-12) --tsOsTdHNUZQcU9Ye Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Takashi, On Mar 8 16:37, Takashi Yano wrote: > On Fri, 6 Mar 2015 20:07:10 +0900 > Takashi Yano wrote: >=20 > > On Thu, 5 Mar 2015 14:58:39 +0100 > > Corinna Vinschen wrote: > >=20 > > > I applied a patch. Please have a look. > >=20 > > I have tested the latest CVS version, and found > > a new problem. > >=20 > > With new CVS version, slave side can not detect > > closure of master. > >=20 > > Please use following Test Case 3. Test Case 3 is > > not terminated by itself with latest CVS. > >=20 > > It seems that the program is stopping at > > cygwait(input_available_event, time_to_wait) > > in fhandler_pty_slave::read(). > >=20 > > I guess input_available_event should be set when > > the last valid master fd is closed. >=20 > For this problem, I have made a patch. >=20 > With this patch, it has been confirmed that the problems > in Test Case 1, 2 and 3 are fixed. >=20 > I am glad if this would be a help. >=20 > However, one matter to be concerned is irregular use of > PeekNamedPipe(). Maybe alternative means could be better > for detecting closure of all master fds. thanks for the patch. I'll have a look later this week. Today and tomorrow I'll be busy with the conversion of the current newlib/cygwin CVS repo to git. Hopefully your copyright assignment has arrived by then, too. Thanks, Corinna --=20 Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat --tsOsTdHNUZQcU9Ye Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJU/WQRAAoJEPU2Bp2uRE+gu+UQAJsYD7mHX5rkEBm7FGTH5CPg 06fKdeJ8wLzQqHfHbkaAP65gXK8ILLBN2tGVsbEffyyGNxte3QRyoe2zngfbYgc2 C2tXNhp6/TxllMpvq59CbFljrY5sW/AayHbpWAFClqyx2aMb/mDVFxXCZ5kR8WlU rF2GiPEVYQ68AVtHXxkjmXTH4+ZPtXzP13JQiLhWWPWbEGxHHae4SywrwGBCpTq+ TW4CmFcGo1s6Xq1hh5EU52T/mUvB1Smet2MfTrsCCkhPvDQzQdKTrbef9aIAyIbn UzOQH0zr+zTbbaBM9P8l0QtLxqE+EQZPN2DWSjv4pByHG5Ytb/aB6Qen7mJg6fYI De68ZRYtmLfT5st1ZMk1WHw1F+tS5gTR/2D1NtE3Bd3qKLRAvvfRkrvxbK5zz8D3 l12uoZ+Q3hhXvPQBQHjq2J4ndCoLA9lNYuqrZfUhxhfWl7MSeunblTyrWNDAX6lL Cq8W+pxByxGl9+F0skuRFa+aaUWX9abWIR8Ltut+fPhTl5SELhknhneAOJ3ufBrz t3+atLDayWbqRcxU9QUie2BhMbb9hDGLzAkDHZVjT625nXSD9ckrYa6P4XvHEQjf +/RyN+Rkmn2im9e1VtPYuc6m5E54z6pWlzDG789tyd1HOFk0xRyBDQtFCO6ZGmGk C4YjMLD4NsMareQkaqVO =rQFH -----END PGP SIGNATURE----- --tsOsTdHNUZQcU9Ye--