delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2019/08/14/15:22:20

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:in-reply-to
:references:mime-version:content-type:content-transfer-encoding;
q=dns; s=default; b=nlkWHP0vwVR5/0O14mbQRTWNL6LZaQ5U6cgbkdsuGXQ
cPcp8m3TA09Zgnud/iaULihhBBydC5cawezz5iH8IqCatwXD3ddTHxx4ptACNl1u
X421wdsUYwlb51sV4Xk5kejGHiy6ygT21lAYJ8xiYl91N7dMPbHXl47vOTqYnYRc
=
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:in-reply-to
:references:mime-version:content-type:content-transfer-encoding;
s=default; bh=s47MchoApdPhJdgclj6N/bks9Ak=; b=ICNfSPYqWXAcW+g88
mNWZyOK+rld4vAS8cRazEY2x0WeR9j/W5mfOzFCIjJ+DzPity3Ov3PNUzZxou5qi
/9BH7EMqaH74axJMwRWblc6sbJCKcoUnZDoRU/N0wcgJo4aE01NdhY8dgjoh6utE
nov6CqbVD4RCMA0e9PwpVNJNyE=
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=-18.0 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_NUMSUBJECT,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=Cause, takashi DOT yano AT nifty DOT ne DOT jp, sk:takashi, D*ne.jp
X-HELO: conssluserg-05.nifty.com
DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-05.nifty.com x7EJLFfI029770
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.ne.jp; s=dec2015msa; t=1565810476; bh=0aW3csaeBWiEM+RA3HTb8Uu2vHSTwWN8jLZw1EPCFHk=; h=Date:From:To:Subject:In-Reply-To:References:From; b=XviYEsstRr51nYbbbOjPsj4jF+bv3/EgOVTd2sCYE8i4XAv5krjlU6h6N6MNu8Rph NIMsVoGJaY7MCeyFo57951WYgEhkkTgIKl+tjl63D/x/Gv0cj73vUL4oOPtcSXR7D0 Bv6y2ooufK7BeGBzxvmRTzlWL7Jt28ID/jSlAc30bliNTYozLrSwc2CkU9HAgzsHBd JDdghePrPnMC/14NASUOTvZArTzgGWl5kth2qTprOq6ShX7BYoHcDwgvYFqMawgFsk QEj0l1MmsX9QfG2Jyg4cIhT+R1NKGgX+REOlQ84rf0D/VaVrmeD5dRvgDQV5/zTZVc Ja5PDleDhD03w==
Date: Thu, 15 Aug 2019 04:21:26 +0900
From: Takashi Yano <takashi DOT yano AT nifty DOT ne DOT jp>
To: cygwin AT cygwin DOT com
Subject: Re: [ANNOUNCEMENT] TEST: Cygwin 3.1.0-0.1
Message-Id: <20190815042126.7c2f0baf57b4a82f7d013f74@nifty.ne.jp>
In-Reply-To: <20190814134900.GY11632@calimero.vinschen.de>
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>
Mime-Version: 1.0
X-IsSubscribed: yes

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.

Strangely, this problem also disappears with this patch.

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 = NULL;
+         //tls->signalfd_select_wait = NULL;
          event = true;
          break;
        default:

Moreover, this EINTR is not set by sigwait_common() but set by
select_stuff::wait().

With following debug print, the message shows:
1 [main] script 1082 select_stuff::wait: signal = 20
script: poll failed: Interrupted system call
Script done, file is typescript

however, the signal 20 (SIGCHLD) is registered to signalfd by
script and should be caught.

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 = %d\n", _my_tls.infodata.si_signo);
       set_sig_errno (EINTR);
       res = select_signalled;  /* Cause loop exit in cygwin_select */
       break;


-- 
Takashi Yano <takashi DOT yano AT nifty DOT ne DOT jp>

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019