Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Fri, 15 Mar 2002 23:28:03 +0100 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: Latest poll() hangs again (was Re: poll() bugs and patch) Message-ID: <20020315232803.L29574@cygbert.vinschen.de> Mail-Followup-To: cygwin AT cygwin DOT com References: <20020313181423 DOT C29574 AT cygbert DOT vinschen DOT de> <20020314131554 DOT I29574 AT cygbert DOT vinschen DOT de> <20020315200120 DOT GA2484 AT tishler DOT net> <20020315221940 DOT J29574 AT cygbert DOT vinschen DOT de> <20020315213321 DOT GA6540 AT redhat DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020315213321.GA6540@redhat.com> User-Agent: Mutt/1.3.22.1i On Fri, Mar 15, 2002 at 04:33:21PM -0500, Chris Faylor wrote: > On Fri, Mar 15, 2002 at 10:19:40PM +0100, Corinna Vinschen wrote: > >On Fri, Mar 15, 2002 at 03:01:21PM -0500, Jason Tishler wrote: > >> Please revert this patch or modify it so that poll() does not hang. > > > >I don't think reverting is the way to go. One of the problems > >[...] > >Unfortunately SUSv2 doesn't handle that special case. That's > >a pity. > > > >However, we could revert to handle invalid_fds again and then call > >cygwin_select only if timeout != -1. > > > >Comments? Boris? Jason? Anybody else? > > How does linux handle these cases? Just tested. It returns immediately if all fd's are invalid, regardless of the timeout value. So there's actually no need to call cygwin_select if all fd's are invalid. I'm not quite sure about the other border cases, Boris is talking about though. This requires further testing. Sigh, I'd hoped that somebody else is doing that this time... I'm inclined to revert the patch and ask Boris to investigate the other cases to come up with a a new patch which still handles the "all fd's are invalid, don't call cygwin_select" correctly... Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Developer mailto:cygwin AT cygwin DOT com Red Hat, Inc. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/