On 06/04/2014 01:28 PM, Dennis Williamson wrote: > On Jun 4, 2014 2:23 PM, "Jens Stimpfle" <deb...@jstimpfle.de> 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 130 >> just as if a job had been aborted. To illustrate, some terminal >> contents: >> >> 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. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature