delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=-1.6 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,RCVD_IN_DNSWL_NONE,UNPARSEABLE_RELAY |
X-Spam-Check-By: | sourceware.org |
X-Yahoo-SMTP: | jenXL62swBAWhMTL3wnej93oaS0ClBQOAKs8jbEbx_o- |
Date: | Wed, 19 Oct 2011 12:22:19 -0400 |
From: | Christopher Faylor <cgf-use-the-mailinglist-please AT cygwin DOT com> |
To: | cygwin AT cygwin DOT com |
Subject: | Re: Question about Cygwin's select() |
Message-ID: | <20111019162219.GB1085@ednor.casa.cgf.cx> |
Reply-To: | cygwin AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
References: | <4E9ED08B DOT 3080503 AT cornell DOT edu> <20111019144910 DOT GB16351 AT calimero DOT vinschen DOT de> |
MIME-Version: | 1.0 |
In-Reply-To: | <20111019144910.GB16351@calimero.vinschen.de> |
User-Agent: | Mutt/1.5.20 (2009-06-14) |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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 |
On Wed, Oct 19, 2011 at 04:49:10PM +0200, Corinna Vinschen wrote: >On Oct 19 09:28, Ken Brown wrote: >> I'm trying to debug an emacs problem, and I'm running into something >> I don't understand involving Cygwin's select. I'll try to make an >> STC if necessary, but I thought I'd start with a verbal description >> in case there's an easy answer. Here's the situation: >> >> emacs creates a subprocess running gdb and sends a bunch of commands >> to gdb without immediately reading the resulting output. emacs then >> goes into a loop in which it waits for keyboard input and >> periodically calls select to check for output from subprocesses. >> The first call to select has a 30 second timeout and *always* fails >> with EINTR. As a result, emacs doesn't read the output from gdb >> right away and doesn't properly initialize the gdb buffer. >> Subsequent calls to select sometimes succeed and sometimes fail. >> When I'm running emacs under gdb and stepping through it, the buffer >> eventually gets initialized. When I'm running emacs outside of gdb, >> the buffer doesn't get initialized until I press Return. >> >> I have a simple workaround for this, but I'd like to be sure there >> isn't some underlying bug that I'm masking with the workaround. So >> my question is this: Is there some reason that I should expect that >> first call to select to consistently fail with EINTR, or might this >> indicate a bug? >> >> I realize that it might not be possible to answer the question based >> on the information I've provided, but I thought it was worth a try. > >Some details are missing like the objects used to communicate with GDB. >Does Emacs use a pseudo tty or a pipe? Is that with Cygwin from CVS or >with 1.7.9? And what's your workaround? The EINTR sounds weird. A >testcase would be most helpful. It isn't clear if you're getting the EINTR by looking at strace output or from the code. If it's strace then be aware that sometimes the output just reports the current errno regardless of whether there is an error or not. cgf -- 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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |