This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Problem with bash-3.0-9 (test)


-----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@byu.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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]