summaryrefslogtreecommitdiff
path: root/perl.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1998-05-14 09:31:34 +0000
committerGurusamy Sarathy <gsar@cpan.org>1998-05-14 09:31:34 +0000
commit9b599b2a63d2324ddacddd9710c41b795a95070d (patch)
tree4180f11ca1ddccb984799ab74df847e9f64f1213 /perl.c
parent491527d0220de34ec13035d557e288c9952d1007 (diff)
downloadperl-9b599b2a63d2324ddacddd9710c41b795a95070d.tar.gz
[win32] merge change#887 from maintbranch
p4raw-link: @887 on //depot/maint-5.004/perl: 6cdf74fe31f049dc2164dbb9e6242179d4b8ee1f p4raw-id: //depot/win32/perl@937
Diffstat (limited to 'perl.c')
-rw-r--r--perl.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/perl.c b/perl.c
index 88c0837ac6..16c5b9fd7f 100644
--- a/perl.c
+++ b/perl.c
@@ -2795,10 +2795,16 @@ my_failure_exit(void)
STATUS_NATIVE_SET(vaxc$errno);
}
#else
+ int exitstatus;
if (errno & 255)
STATUS_POSIX_SET(errno);
- else if (STATUS_POSIX == 0)
- STATUS_POSIX_SET(255);
+ else {
+ exitstatus = STATUS_POSIX >> 8;
+ if (exitstatus & 255)
+ STATUS_POSIX_SET(exitstatus);
+ else
+ STATUS_POSIX_SET(255);
+ }
#endif
my_exit_jump();
}