Re: [perl #128468] Using negative exit code should probably be forbidden (exit -99999)

2016-06-23 Thread Brandon Allbery
On Thu, Jun 23, 2016 at 5:48 PM, Alex Jakimenko <
perl6-bugs-follo...@perl.org> wrote:

> exit -9 # exit code is 97
> exit -99# exit code is 193
> exit -9 # exit code is 1
> exit -  # exit code is 1
>
> I think that only non-negative numbers should be allowed.
>

Historically -1 has been used (on unixlikes) to mean 255; in the old days,
whether the exit status was signed or not was per platform/implementation.
(This is why shells produce 255 for command not found.)

And... well, try these in perl 5 and see what you get. (tl;dr: the same
values as rakudo)

-- 
brandon s allbery kf8nh   sine nomine associates
allber...@gmail.com  ballb...@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonadhttp://sinenomine.net


[perl #128468] Using negative exit code should probably be forbidden (exit -99999)

2016-06-23 Thread via RT
# New Ticket Created by  Alex Jakimenko 
# Please include the string:  [perl #128468]
# in the subject line of all future correspondence about this issue. 
# https://rt.perl.org/Ticket/Display.html?id=128468 >


exit -9 # exit code is 97
exit -99# exit code is 193
exit -9 # exit code is 1
exit -  # exit code is 1

I think that only non-negative numbers should be allowed.