Unix is using an 8-bit value as exit/return code (see man wait). This value is typically interpreted as an unsigned value by the shell.
Update: but you could use Perl to display it properly :) For example
$ perl -e 'exit -111' $ perl -e "print unpack('c',pack 'C', $?),\$/" -111
(possible range -128 .. 127)
In reply to Re: negative exit codes?
by almut
in thread negative exit codes?
by wscott44
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |