Skip Menu |
Report information
Id: 128468
Status: open
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: alex.jakimenko [at] gmail.com
Cc:
AdminCc:

Severity: (no value)
Tag: (no value)
Platform: (no value)
Patch Status: (no value)
VM: (no value)



Subject: Using negative exit code should probably be forbidden (exit -99999)
Download (untitled) / with headers
text/plain 193b
exit -99999 # exit code is 97 exit -999999 # exit code is 193 exit -999999999 # exit code is 1 exit -99999999 # exit code is 1 I think that only non-negative numbers should be allowed.
Date: Thu, 23 Jun 2016 19:58:00 -0400
CC: bugs-bitbucket [...] rt.perl.org
Subject: Re: [perl #128468] Using negative exit code should probably be forbidden (exit -99999)
From: Brandon Allbery <allbery.b [...] gmail.com>
To: perl6-compiler <perl6-compiler [...] perl.org>
Download (untitled)
multipart/alternative 2.7k

Message body not shown because it is not plain text.

Download (untitled) / with headers
text/plain 829b
On Thu, Jun 23, 2016 at 5:48 PM, Alex Jakimenko <perl6-bugs-followup@perl.org> wrote:
Show quoted text
exit -99999     # exit code is 97
exit -999999    # exit code is 193
exit -999999999 # exit code is 1
exit -99999999  # 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
allbery.b@gmail.com                                  ballbery@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org