summaryrefslogtreecommitdiff
path: root/t/run
diff options
context:
space:
mode:
authorJohn Malmberg <wb8tyw@gmail.com>2009-01-04 12:42:07 -0600
committerCraig A. Berry <craigberry@mac.com>2009-01-04 21:31:36 -0600
commite08e1e1d056fc71c85ae29ec7e82ba2b6320e6e4 (patch)
tree641cec45bf6aa05d60a9cff7e6ebaba4d968c4b4 /t/run
parentef3a38ffad701e4f5a98a0a1f84c7e2e8c3da11e (diff)
downloadperl-e08e1e1d056fc71c85ae29ec7e82ba2b6320e6e4.tar.gz
VMS posix exit fixes
perl.h and perl.c need further fixes to get VMS to return the expected POSIX exit codes when that is enabled. This fix gets the correct numbers except for the SIGTERM case, which will need some more work. It also gets the posix exit code to set an error severity on a fatal exit so that DCL and MMS/MMK or VMS native programs can easily detect a script failure. This patch does not address an issue in vms.c where the feature logicals may not be correctly read. That will follow in a future patch. The tests have been adjusted to detect when VMS is in the POSIX exit mode and perform properly. -John wb8tyw@gmail.com -- My qsl.net e-mail address is temporarily out of order.
Diffstat (limited to 't/run')
-rw-r--r--t/run/exit.t8
1 files changed, 5 insertions, 3 deletions
diff --git a/t/run/exit.t b/t/run/exit.t
index f59584cd8f..986afeaad4 100644
--- a/t/run/exit.t
+++ b/t/run/exit.t
@@ -27,8 +27,10 @@ if ($^O eq 'VMS') {
if (eval 'require VMS::Feature') {
$vms_exit_mode = !(VMS::Feature::current("posix_exit"));
} else {
- my $unix_rpt = $ENV{'DECC$FILENAME_UNIX_REPORT'} =~ /^[ET1]/i;
- my $posix_ex = $ENV{'PERL_VMS_POSIX_EXIT'} =~ /^[ET1]/i;
+ my $env_unix_rpt = $ENV{'DECC$FILENAME_UNIX_REPORT'} || '';
+ my $env_posix_ex = $ENV{'PERL_VMS_POSIX_EXIT'} || '';
+ my $unix_rpt = $env_unix_rpt =~ /^[ET1]/i;
+ my $posix_ex = $env_posix_ex =~ /^[ET1]/i;
if (($unix_rpt || $posix_ex) ) {
$vms_exit_mode = 0;
} else {
@@ -149,7 +151,7 @@ if ($^O eq 'VMS') {
$exit_arg = 42;
$exit = run("END { \$? = $exit_arg }");
-# On VMS, in the child process the actual exit status will be SS$_ABORT,
+# On VMS, in the child process the actual exit status will be SS$_ABORT,
# or 44, which is what you get from any non-zero value of $? except for
# 65535 that has been dePOSIXified by STATUS_UNIX_SET. If $? is set to
# 65535 internally when there is a VMS status code that is valid, and