In the VMS-specific bits of perl.c:Perl_my_failure_exit, the exit status
was only being set when errno and/or vaxc$errno were non-zero. If both
were zero, Perl would exit with a success status. This has been causing
the following three tests in bleadperl to fail:
t/op/tie.............................FAILED at test 21
ext/Filter/t/call....................FAILED at test 1
lib/strict...........................FAILED at test 112
What is really bizarre is that the code in question does not appear to
have been touched in years. Either the test suite finally exposed a long
unnoticed problem, or it is a relatively new thing to be calling
Perl_my_failure_exit under conditions that do not set errno.
The attached patch expands the circumstances under which the generic
failure status SS$_ABORT will be used to include the case of errno being
zero. This tracks the behavior of the non-VMS code path, where 255 will
be used when errno is not set. After the patch, the three tests above pass.
--- perl.c;-0 Mon May 31 17:44:29 2004
+++ perl.c Tue Jun 1 19:44:23 2004
@@ -4616,7 +4616,7 @@ Perl_my_failure_exit(pTHX)
STATUS_NATIVE_SET(44);
}
else {
- if (!vaxc$errno && errno) /* unlikely */
+ if (!vaxc$errno) /* unlikely */
STATUS_NATIVE_SET(44);
else
STATUS_NATIVE_SET(vaxc$errno);