Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
To: cygwin@cygwin.com
From: Krzysztof Duleba <krzysan@skrzynka.pl>
Subject:  Re: Problem with bash-3.0-9 (test)
Date:  Tue, 26 Jul 2005 17:12:19 +0200
Lines: 14
Message-ID: <dc5jsn$fei$1@sea.gmane.org>
References:  <42E53027.8050409@acm.org> <42E5351D.4030700@byu.net> <42E638E1.2040806@byu.net>
Mime-Version:  1.0
Content-Type:  text/plain; charset=ISO-8859-2; format=flowed
Content-Transfer-Encoding:  7bit
User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)
In-Reply-To: <42E638E1.2040806@byu.net>
X-IsSubscribed: yes

Eric Blake wrote:

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

Isn't this caused by the fact that bash returns $? when exits and Ctrl-C 
sets $? to 1? ksh, on the other hand, sets $? to 130 after Ctrl-C.

Krzysztof Duleba


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

