John E. Malmberg wrote:

Which the code that is failing is:

$exit_arg = 42;
$exit = run("END { \$? = $exit_arg }");

$exit_arg = (44 & 7) if $^O eq 'VMS';
is( $exit >> 8, $exit_arg,             'Changing $? in END block' );

The severity for 42 is "ERROR" and apparently on VMS, changing the status to that in the end block should cause an exit code of 44.

But with out the END block, the exit code of 42 should be passed through. I have that case working.


I have not figured out where this is failing, but I suspect it is the same issue.

EAGLE> MCR Sys$Disk:[]Perl. "-I[-.blib.lib]" "-I[-.lib]" "-I[-.t.lib]" [.lib.Test.Simple.sample_tests]too_few.plx
EAGLE> show sym $status
  $STATUS == "%X000000FF"

The status should be 44. FF is being converted to the native success status of 1 and UNIX status of 0 by the parent copy of Perl when this is run in the full test.

As a follow up, the expected behavior for VMS in an END block, once I find out where it is going wrong, is apparently:

#ifdef __VMS
   if (STATUS_UNIX != 0) {
        if (MY_POSIX_EXIT)
            STATUS_UNIX_EXIT_SET(STATUS_UNIX);
        else
            STATUS_ALL_FAILURE;
   }
#else

When the VMS specific macro is set, the original UNIX exit status of a child will be recovered by the parent.

-John
[EMAIL PROTECTED]
Personal Opinion Only

Reply via email to