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

2014-06-04 Thread Jens Stimpfle
Hi, please Cc: me as I'm not subscribed. When I abort a bash prompt using Ctrl-c, the $? variable is set to 130 just as if a job had been aborted. To illustrate, some terminal contents: jfs@knirps:~$ echo Hello Hello jfs@knirps:~$ echo $? 0 jfs@knirps:~$ echo H^C jfs@knirps:~$ echo $? 130 jfs@kni

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

2014-06-04 Thread Dennis Williamson
On Jun 4, 2014 2:23 PM, "Jens Stimpfle" wrote: > > Hi, please Cc: me as I'm not subscribed. > > When I abort a bash prompt using Ctrl-c, the $? variable is set to 130 > just as if a job had been aborted. To illustrate, some terminal > contents: > > jfs@knirps:~$ echo Hello > Hello > jfs@knirps:~$

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

2014-06-04 Thread Eric Blake
On 06/04/2014 01:28 PM, Dennis Williamson wrote: > On Jun 4, 2014 2:23 PM, "Jens Stimpfle" wrote: >> >> Hi, please Cc: me as I'm not subscribed. That's the general policy of any list which allows posts from non-subscribers. >> >> When I abort a bash prompt using Ctrl-c, the $? variable is set to

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

2014-06-04 Thread Jens Stimpfle
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 k

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

2014-06-04 Thread Ryan Cunningham
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 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 feel

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

2014-06-04 Thread Jens Stimpfle
On Wed, Jun 04, 2014 at 05:40:10PM -0700, Ryan Cunningham wrote: > According to Dennis's e-mail, this is normal behavior, not a bug. Do not > attempt to fix it. That email only calculates 130 = 128 + SIGINT which I had already figured out. There was no argument that setting $? on prompt abort wa