delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2013/01/12/12:41:55

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_YE,SPF_HELO_PASS,TW_FD
X-Spam-Check-By: sourceware.org
Message-ID: <50F1A047.7080109@towo.net>
Date: Sat, 12 Jan 2013 18:41:27 +0100
From: Thomas Wolff <towo AT towo DOT net>
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/20130107 Thunderbird/17.0.2
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: select() not interrupted by signals
References: <50EFD041 DOT 4090108 AT towo DOT net> <20130111153857 DOT GB3450 AT ednor DOT casa DOT cgf DOT cx>
In-Reply-To: <20130111153857.GB3450@ednor.casa.cgf.cx>
X-TagToolbar-Keys: D20130112184127028
X-IsSubscribed: yes
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

Am 11.01.2013 16:38, schrieb Christopher Faylor:
> On Fri, Jan 11, 2013 at 09:41:37AM +0100, Thomas Wolff wrote:
>> I had previously reported "select() hanging after terminal killed"
>> (http://cygwin.com/ml/cygwin/2011-05/msg00418.html).
>> It turns out that select() does not get interrupted by a SIGWINCH signal
>> either (with likely the same cause).
>> This raises problems with interactive programs that want to react to
>> window size changes (like text editors).
>>
>> See attached updated test case; run the program, while select() is
>> waiting (before 5 second timeout each), change window size and see no
>> interrupt.
> "No interrupt"?  I see a "HUP" but select() keeps going.  That was the
> way I designed it but apparently that differs from the way Linux works.
> select() is not restartable like read() or write().
>
> That behavior should be fixed in the next snapshot.  If you are seeing
> something different than this then that is not fixed.
After Corinna wrote:
> You could test using the binary...
Yes, fixed with latest snapshot, thanks a lot. At least as far as I am 
concerned, i.e.
Not sure what exactly you mean with "select is not restartable" -
actually, that made me test again more deeply, and it seems you 
interrupt select() now on every signal;
as I understood it should only get interrupted on a signal related to a 
file descriptor for which the bit in the exceptfds vector is set...
I'll recheck that on Unix next week.
------
Thomas

--
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