On Mon, Jan 15, 2018 at 09:25:37AM -0500, Randall S. Becker wrote: > On January 15, 2018 2:06 AM, Johannes Sixt wrote: > > I take "die exits with non-zero" as a piece of information for the > > *users* so that they can write "if perl foo.pl; then something; fi" in shell > > scripts. I do *not* interpret it as leeway for implementers of perl to choose > > any random value as exit code. Choosing 162 just to be funky would be > > short-sighted. [I'm saying all this without knowing how perl specifies 'die' > > beyond the paragraph you cited. Perhaps there's more about 'die' that > > justifies exit code 162.] I'd say that the perl port is broken. > > I agree that 162 is wrong. Its interpretation is 128+signal, which > clearly does not happen in this case. On the platform, if the perl > script is via stdin, 162 or 169 are returned. If via file (perl > file.pl), 255 comes back. The port has issues. I have an opened a bug > report with the platform developers. Usual non-Open Source timeframes > to fix apply. ☹ I believe the standard behavior for Perl with die is the following: exit $! if $!; exit $? >> 8 if $? >> 8; exit 255; # otherwise Is there an errno value on your port that matches 162? Maybe EBADF? On Linux, I get the following: genre ok % printf die | perl -; echo $? Died at - line 1. 9 -- brian m. carlson / brian with sandals: Houston, Texas, US https://www.crustytoothpaste.net/~bmc | My opinion only OpenPGP: https://keybase.io/bk2204