delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/07/26/11:15:47

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
To: cygwin AT cygwin DOT com
From: Krzysztof Duleba <krzysan AT skrzynka DOT 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 DOT 8050409 AT acm DOT org> <42E5351D DOT 4030700 AT byu DOT net> <42E638E1 DOT 2040806 AT byu DOT net>
Mime-Version: 1.0
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/

- Raw text -


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