Hi Matthias,

Matthias Klose wrote:
matthieu castet writes:

Package: bash
Version: 3.0-14
Severity: normal

Hi,

Bash accept negative exit status, I don't now if it is normal (dash or
posh don't accept it.)

But even if there are accepted, the return value is wrong :
$ bash -c "exit -1"; echo $?
255

bash -c "exit -10"; echo $?
246


I don't see anything, why this should be disallowed, the behaviour is
the same as in zsh. The exit status is anded with 0377, see exit(3).

Ok, may be it could be nice to add it in bash man page.

I still wonder if it is valid for POSIX mode as it is not supported by dash and posh. If it is ok, may be a bug report should be filled for dash and posh...


Regards,

Matthieu


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to