delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/07/26/09:23:02

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
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
Message-ID: <42E638E1.2040806@byu.net>
Date: Tue, 26 Jul 2005 07:21:37 -0600
From: Eric Blake <ebb9 AT byu DOT net>
User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: Problem with bash-3.0-9 (test)
References: <42E53027 DOT 8050409 AT acm DOT org> <42E5351D DOT 4030700 AT byu DOT net>
In-Reply-To: <42E5351D.4030700@byu.net>
X-IsSubscribed: yes

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Eric Blake on 7/25/2005 12:53 PM:
> According to David Rothenberger on 7/25/2005 12:32 PM:
> 
>>>I tried out the new test version of bash-3.0 (bash-3.0-9) and noticed a
>>>problem. When I press Ctrl-C at the bash prompt, bash itself exists.
>>>This happens when bash is started in a rxvt window or a regular Windows
>>>cmd shell window. I don't have this problem with bash-3.0-8.
> 
> 
> I noticed that too, and am trying to figure out what is going wrong.  I
> also noticed that the libreadline6 dynamic linking is still breaking
> tilde-expansion.  I intentionally left bash-3.0-9 as a test version, with
> no announcement; hopefully I can find out what is going wrong and get it
> fixed for bash-3.0-10.

Something weird is going on.  Once I have a shell open, and fire up a
second level bash (non-login), Ctrl-C behaves correctly and cancels the
current line input with exiting the shell.  But then when I type exit,
bash returns with exit status 1, even though it did absolutely nothing and
should be returning 0.  (On a possibly related note, in ksh, typing Ctrl-C
then exiting gives exit status 130, instead of 0; but zsh gets it correct
and returns 0).

But in the login shell, Ctrl-C is killing bash rather than being
intercepted.  I don't recall changing anything between the -8 and -9
release that would affect only login shells, but I do know that only -9
uses spawnve(), so maybe there are some corner case bugs in spawnve()
behavior (or bash's new use of it) that get tickled by login shells.  The
patch in -9 only attempts to use spawnve when bash is not worried about
job control.  For regular shells job control is on by default, but for
login shells, I noticed with an strace that job control is not enabled
until after /etc/profile (and so forth) have completed execution, so login
shells are invoking spawnve during startup.

As a workaround, if you want to play with bash-3.0-9, either use it as a
non-login shell or don't hit Ctrl-C.

I'm also having no problems whatsoever with tilde-expansion using
bash-3.0-9 on my XP or win98 machines; it was only on a Win2k box where
that didn't seem to work (I'll have to check that again).

- --
Life is short - so eat dessert first!

Eric Blake             ebb9 AT byu DOT net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFC5jjg84KuGfSFAYARArqIAKCeqUkxWQ7maJzhdCuEas7qx6IutQCffwmN
oI98Qmu+sqQO3QkJAz5lJW8=
=dVKn
-----END PGP SIGNATURE-----

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