bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Aborting prompt with Ctrl-c sets exit status variable ($?) to 130


From: Jens Stimpfle
Subject: Re: Aborting prompt with Ctrl-c sets exit status variable ($?) to 130
Date: Wed, 4 Jun 2014 23:02:47 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Wed, Jun 04, 2014 at 01:34:22PM -0600, Eric Blake wrote:
> On 06/04/2014 01:28 PM, Dennis Williamson wrote:
> >> My feeling is that aborting a prompt should not change the $? variable.
> 
> I agree that it is annoying behavior that Ctrl-C changes $?, but at
> least we're in good company, since ksh has the same behavior (well,
> there $? is set to 258, since ksh takes advantage of the POSIX rule that
> it can represent exit due to signal in $? by using values that are
> unambiguous with regular exit).  zsh almost has the same behavior,
> except it sets $? to 1 instead of any indication that a signal occurred.

Dash on the other hand doesn't change $?.
I don't think we can speak of "exit" here.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]