Re: large exit values (255)

2009-02-26 Thread Sven Mascheck
On Wed, Feb 25, 2009 at 01:20:50PM -0500, Mike Frysinger wrote: seems there's a way to get bash to report exit values greater than 255 ... you will find the special error values in shell.h, for instance #define EX_SHERRBASE256 /* all special error values are this. */ #define

Re: large exit values (255)

2009-02-26 Thread Mike Frysinger
On Thursday 26 February 2009 03:25:50 Sven Mascheck wrote: On Wed, Feb 25, 2009 at 01:20:50PM -0500, Mike Frysinger wrote: seems there's a way to get bash to report exit values greater than 255 ... you will find the special error values in shell.h, for instance #define EX_SHERRBASE

large exit values (255)

2009-02-25 Thread Mike Frysinger
seems there's a way to get bash to report exit values greater than 255 ... since it requires certain key presses, things in between ... means a key press rather than typing literally ... $ true $ echo 'enter ctrl+c $ echo $? 128 $ echo 'enter ctrl+c $ echo 'enter ctrl+c $ echo $? 128 $ true $

Re: large exit values (255)

2009-02-25 Thread Jan Schampera
Mike Frysinger wrote: $ true $ echo 'enter ctrl+d $ echo $? 258 $ true $ echo 'enter ctrl+d $ echo 'enter ctrl+c $ echo $? 386 that doesnt seem right to me :) the first test seems fine, and older versions of bash would set 258 for the second test (not sure if it's correct

Re: large exit values (255)

2009-02-25 Thread Jan Schampera
Mike Frysinger wrote: $ true $ echo 'enter ctrl+d $ echo $? 258 $ true $ echo 'enter ctrl+d $ echo 'enter ctrl+c $ echo $? 386 Just tested it, hopefully it's as easy as changing every itos (last_command_exit_value) to itos (last_command_exit_value 0xFF) in subst.c (seems 2