[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
exit 256 could lead to catastrophic failures of missile systems, etc.
From: |
Dan Jacobson |
Subject: |
exit 256 could lead to catastrophic failures of missile systems, etc. |
Date: |
22 Nov 2001 12:03:28 +0800 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 |
[Original title: "exit beyond 0-255 not mentioned"], now switched for
more eye-catching one.
$ help exit
exit: exit [n]
Exit the shell with a status of N. If N is omitted, the exit status
is that of the last command executed.
I thought you said n, not N.
$ man bash
exit [n]
Cause the shell to exit with a status of n. If n
is omitted, the exit status is that of the last
command executed.
That's more like it, but wait,
$ exit 555
exit
Process shell<1> exited abnormally with code 43
Well, I think there's some explaining to do on the man page about why
one can't exit with their favourite number in some cases.
mention that you'll get the same as
$ echo $((255&555)) $((255&-555))
43 213
etc.
Indeed, warn that
$ exit 256
and its multiples return like
$ true
and thus could lead to catastrophic failures of missile systems,
etc. [if one was doing
$ launch_check && launch
]
bash version 2.05.0(1)
--
http://www.geocities.com/jidanni/ Tel+886-4-25854780
- exit 256 could lead to catastrophic failures of missile systems, etc.,
Dan Jacobson <=