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: Ryan Cunningham
Subject: Re: Aborting prompt with Ctrl-c sets exit status variable ($?) to 130
Date: Wed, 4 Jun 2014 17:40:10 -0700

According to Dennis's e-mail, this is normal behavior, not a bug. Do not 
attempt to fix it.

-- 
Sent from my iPad

> On Jun 4, 2014, at 2:02 PM, Jens Stimpfle <address@hidden> wrote:
> 
>> 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]