I think I have found it.

The old default behavior is in effect when the VMS specific macro MY_POSIX_EXIT evaluates to 0.

When setting $? in mg.c, as a side effect, if $? is not 0, then default VMS behavior is to set STATUS_NATIVE to SS$_ABORT.

When Perl_my_exit() is called with other than 0 or 1, then the VMS behavior is to pass through the UNIX status as if it were a VMS status.

I have been alternately and incorrectly setting them both to behave the same way in my attempts to get this working right again.

die() on VMS is expected to force the error status to be what VMS
classes as "FATAL" otherwise known as "SEVERE", which appears to be contrary to the documentation.

And new behavior:

When the VMS specific macro MY_POSIX_EXIT evaluating as 1, the setting of $? is encoded into STATUS_NATIVE where it can be recovered by the parent program.

When Perl_my_exit() is called with MY_POSIX_EXIT == 1, the UNIX exit status is encoded into STATUS_NATIVE where it also can be recovered
by the parent program.

With the POSIX_EXIT feature set, DIE will force the equivalent UNIX exit code to be encoded.

With the POSIX_EXIT feature set, the exit codes on Perl programs will behave like on a UNIX system, and not require VMS specific handling.

When Perl detects it is running under the BASH shell on VMS, it will need to set the POSIX_EXIT feature.

Too bad I can not just change the default to be the POSIX_EXIT behavior, as that is not 100% compatible with past Perl behavior on VMS, but gives the results that I think that most programmers (with out previous Perl on VMS experience) would expect, and allows removing a lot of VMS specific code in the test scripts. But the test scripts still have to work with older perls.

-John
[EMAIL PROTECTED]
Personal Opinion Only

Reply via email to