delorie.com/archives/browse.cgi | search |
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:cc:subject:message-id:reply-to | |
:references:mime-version:content-type:in-reply-to; q=dns; s= | |
default; b=CzRu456fzHmROvBDtq2VhYD8J2HewCf9KrJrveNfkpTi0VhDF4p0d | |
556g2a9QcPvIx7LDyctrfJa8SMB40+891/f75wr/im8IVapTJoO57W4mHCgiwbuz | |
tuZ1ICrRAc36ozMNm6rCeSkg1YeKWbIs6foSNvQhwAYTduak79etKk= | |
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=jThw3oOEZmTnoKx00IKEvVa1348=; b=pLjvLu7xUxq7qgwT9CuuXWhdxUa8 | |
5sivYzIxy9c81ydEV1540tytoUTwdJlxEgshakk2KvACgJaXZzM7Vxa+Nl445kDR | |
SITHCnvfK2pdBgVYYOK0yzfiiHNg/w/PceS5XnbmqRFsMXW7vol7tH2SFTOdEXwX | |
xI0DOK9nxYA3r1U= | |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
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-Spam-SWARE-Status: | No, score=-115.5 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,GOOD_FROM_CORINNA_CYGWIN,KAM_NUMSUBJECT,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=abroad |
X-HELO: | mout.kundenserver.de |
Date: | Thu, 15 Aug 2019 09:49:30 +0200 |
From: | Corinna Vinschen <corinna-cygwin AT cygwin DOT com> |
To: | Takashi Yano <takashi DOT yano AT nifty DOT ne DOT jp> |
Cc: | cygwin AT cygwin DOT com |
Subject: | Re: [ANNOUNCEMENT] TEST: Cygwin 3.1.0-0.1 |
Message-ID: | <20190815074930.GF11632@calimero.vinschen.de> |
Reply-To: | cygwin AT cygwin DOT com |
Mail-Followup-To: | Takashi Yano <takashi DOT yano AT nifty DOT ne DOT jp>, cygwin AT cygwin DOT com |
References: | <announce DOT 20190809185338 DOT GZ11632 AT calimero DOT vinschen DOT de> <20190812224403 DOT 37e4ccfdcfb7046ed70fef16 AT nifty DOT ne DOT jp> <20190812153613 DOT GN11632 AT calimero DOT vinschen DOT de> <20190813104753 DOT GU11632 AT calimero DOT vinschen DOT de> <20190814204100 DOT 659fe40d928eae15338198a7 AT nifty DOT ne DOT jp> <20190814204717 DOT caf6884b1216bbeee2f586d6 AT nifty DOT ne DOT jp> <20190814134900 DOT GY11632 AT calimero DOT vinschen DOT de> <20190815042126 DOT 7c2f0baf57b4a82f7d013f74 AT nifty DOT ne DOT jp> |
MIME-Version: | 1.0 |
In-Reply-To: | <20190815042126.7c2f0baf57b4a82f7d013f74@nifty.ne.jp> |
User-Agent: | Mutt/1.11.3 (2019-02-01) |
--9j2ELPqTsVbCO5A+ Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Aug 15 04:21, Takashi Yano wrote: > On Wed, 14 Aug 2019 15:49:00 +0200 > Corinna Vinschen wrote: > > The only reason I can see is if sigwait_common() returns EINTR because > > it was interrupted by an unrelated signal. This in turn lets the read() > > call fail with EINTR and that should be expected by the callers, in > > theory. >=20 > Strangely, this problem also disappears with this patch. >=20 > diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc > index 9cf892801..82ac0674f 100644 > --- a/winsup/cygwin/select.cc > +++ b/winsup/cygwin/select.cc > @@ -1869,7 +1869,7 @@ thread_signalfd (void *arg) > switch (WaitForSingleObject (si->evt, INFINITE)) > { > case WAIT_OBJECT_0: > - tls->signalfd_select_wait =3D NULL; > + //tls->signalfd_select_wait =3D NULL; > event =3D true; > break; > default: The problem with not setting signalfd_select_wait to NULL here is that only a subsequent read or sigwaitinfo will do, so there's a time post-select which will reroute the signal wrongly. > Moreover, this EINTR is not set by sigwait_common() but set by > select_stuff::wait(). >=20 > With following debug print, the message shows: > 1 [main] script 1082 select_stuff::wait: signal =3D 20 > script: poll failed: Interrupted system call > Script done, file is typescript >=20 > however, the signal 20 (SIGCHLD) is registered to signalfd by > script and should be caught. >=20 > diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc > index 9cf892801..adcc75ad3 100644 > --- a/winsup/cygwin/select.cc > +++ b/winsup/cygwin/select.cc > @@ -446,6 +446,7 @@ next_while:; > unconditionally, ignoring any SA_RESTART detection by > call_signal_handler(). */ > _my_tls.call_signal_handler (); > + system_printf ("signal =3D %d\n", _my_tls.infodata.si_signo); > set_sig_errno (EINTR); > res =3D select_signalled; /* Cause loop exit in cygwin_select */ > break; So the signal is then caught in the wrong spot. Bummer. Perhas the entire signalfd_select_wait idea was flawed from the beginning. I guess the signalfd implementation needs a restart, but I only have a week left before I'll be mostly abroad for a couple of weeks. Any ideas greatly appreciated. Corinna --=20 Corinna Vinschen Cygwin Maintainer --9j2ELPqTsVbCO5A+ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEoVYPmneWZnwT6kwF9TYGna5ET6AFAl1VDooACgkQ9TYGna5E T6AQIA/+MuiS9lup2hgfStP9ukDVQlNzF6tzNsFL+A1qP9WQmB1bQhG7xEKcbtni 08NPLZ23tI9/8BAUxqeT7vSj873qd/a7/w4NhP5P9J4sr+IXomppSCRJNA0QzzJE zx/mon4fwOF7qVkylwCigepSYosgYFjr4/FqNF/FA9dsFKXkRfHaPlhk6th5cNJj 4GuFqkIgfo7rYVIpn43M5183pZbfzqMBTm1oXnDNlRxz5JJJ4qA8soi5Hsy0Cb50 huTNxVSrRxt/tupqgyZLq/F4LpKnNVaUvsWg6FQZLOYBvsk92+vuLAfXmSAMuLK7 VdNhX8ylsJpVmnstAeV1tetjhSkfuyTM3WpRevb6e+L4w+JGtu974HNHiPXvVD/l BWkueIHgs2oUEVybTlBiHmpb81cclftZG5vdt8OK6LmpuRBjFffdnPmkZWmh+6RU AdgBhycimfXcHaO+bOfl9Jmspn+RvfferQyQY1Vaa5OdU9fLPhiU3B4eUv7yl6kq 0ydpes3XpOmyYfOX4E8EW/LVz8U1oA4vVetEoXhdmJ6ayq2caWYAYrBoeTTRMU8v HwQla7AFkT5zL7RRoevunN6F5OXYnYchkFFVu9wDAVTxuwh7LpmVTNBfBth0C4fX 1Hkroe6apGyXEC2YscV+mHLi6A6cXQ/PfhY/Oiha50dFp1ayktg= =dKh3 -----END PGP SIGNATURE----- --9j2ELPqTsVbCO5A+--
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |