delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/04/13/11:16:15

X-Spam-Check-By: sourceware.org
Date: Fri, 13 Apr 2007 11:15:21 -0400
From: Bob Rossi <bob_rossi AT cox DOT net>
To: cygwin AT cygwin DOT com
Subject: Re: SIGTSTP and select
Message-ID: <20070413151521.GD25914@cox.net>
Mail-Followup-To: cygwin AT cygwin DOT com
References: <20070403000723 DOT GG24160 AT cox DOT net> <20070403003753 DOT GA11244 AT ednor DOT casa DOT cgf DOT cx> <20070403141320 DOT GA3459 AT cox DOT net> <20070413132501 DOT GG15801 AT calimero DOT vinschen DOT de> <20070413140108 DOT GA25914 AT cox DOT net> <20070413145136 DOT GK15801 AT calimero DOT vinschen DOT de> <20070413150356 DOT GA17273 AT ednor DOT casa DOT cgf DOT cx>
MIME-Version: 1.0
In-Reply-To: <20070413150356.GA17273@ednor.casa.cgf.cx>
User-Agent: Mutt/1.5.12-2006-07-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 Fri, Apr 13, 2007 at 11:03:56AM -0400, Christopher Faylor wrote:
> >Ok, there's a difference between tty and notty mode here.  I can
> >reproduce this with notty, while I get a -1/EINTR with CYGWIN=tty. 
> >This is a bit unfortunate difference which is probably a result of
> >different handling of console handles (notty) vs. pipe handles (tty).
> >I'm not sure how to fix that.  Signals and select are rather Chris'
> >contruction lot.
> 
> I'm not in a position to test this right now but, if cygwin is in
> blocking mode, i.e., select is in an infinite wait, it should be
> possible to use CTRL-Z to suspend it.  I will look into this once I have
> my computers put back together.

OK, thank you. The test case easily reproduces this behavior.

What I'm really wondering is if I should hold up a release of cgdb over
this. I could do one of several things
  - wait to do a release until select is changed
  - tell the user to use CYGWIN=tty if they want to do ctrl-z
  - add my hack to fix this problem with the way things are

> >The restart behaviour as you observed on Linux is not implemented for
> >select in Cygwin so far.  Only a few system calls actually implement
> >this right now.  You should always handle EINTR yourself, as your loop
> >already does.
> >
> >While that's not a nice solution in the long run, it might be better
> >to ask the use to run cgdb with CYGWIN=tty for now (which is default
> >in remote sessions, that's why I couldn't reproduce anything first).
> >You could for instance add a cgdb wrapper script which always adds tty
> >to $CYGWIN and starts the cgdb binary.
> 
> Or start gdb in a pty.

Sorry, I'm not sure what you mean. If you are talking about the way cgdb
starts gdb, yes, it uses a pty.

However, the test case reproduces all of this without gdb being involved 
at all.

Thanks again,
Bob Rossi

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

- Raw text -


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