[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: large exit values (>255)
From: |
Mike Frysinger |
Subject: |
Re: large exit values (>255) |
Date: |
Thu, 26 Feb 2009 03:58:02 -0500 |
User-agent: |
KMail/1.11.0 (Linux/2.6.28; KDE/4.2.0; x86_64; ; ) |
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 256 /* all special error values are > this.
> */ #define EX_BADSYNTAX 257 /* shell syntax error */
> #define EX_USAGE 258 /* syntax error in usage */
> #define EX_REDIRFAIL 259 /* redirection failed */
> #define EX_BADASSIGN 260 /* variable assignment error */
> #define EX_EXPFAIL 261 /* word expansion failed */
those dont appear to be documented anywhere ... my bash(1) page mentions
standard 0..127 and 128+n (where n is the signal #).
> > $ echo '<enter>
> > <ctrl+c>
> > $ echo $?
> > 386
>
> but you haven't mentioned your version.
> (I don't see that with bash-3.2.48/4.0.0 on linux 2.6.23/libc2.3.6)
i havent, but Chet would have guessed bash-4 since ive e-mailed so many times
over the last few days about regressions in it ...
-mike