summaryrefslogtreecommitdiff
path: root/pp_sys.c
diff options
context:
space:
mode:
authorChip Salzenberg <chip@perl.com>1997-02-04 11:16:46 +1200
committerChip Salzenberg <chip@atlantic.net>1997-02-11 07:29:00 +1200
commit91e9c03fe206e18256c19e5e5628ca536e8b1fd6 (patch)
treec02b0679ff373a4ead204eeb469dcf8d434490a8 /pp_sys.c
parent046ff0edbba626fc32c37c08cfba99cfeef41b6d (diff)
downloadperl-91e9c03fe206e18256c19e5e5628ca536e8b1fd6.tar.gz
Fix value of system() and $? for DEC UNIX, VMS, others
Diffstat (limited to 'pp_sys.c')
-rw-r--r--pp_sys.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/pp_sys.c b/pp_sys.c
index e593b6c8f9..0be532fb77 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -2943,11 +2943,10 @@ PP(pp_system)
} while (result == -1 && errno == EINTR);
(void)rsignal_restore(SIGINT, &ihand);
(void)rsignal_restore(SIGQUIT, &qhand);
- STATUS_NATIVE_SET(status);
- value = (result == -1) ? -1 : status;
+ STATUS_NATIVE_SET(result == -1 ? -1 : status);
do_execfree(); /* free any memory child malloced on vfork */
SP = ORIGMARK;
- PUSHi(value);
+ PUSHi(STATUS_POSIX);
RETURN;
}
if (op->op_flags & OPf_STACKED) {
@@ -2973,7 +2972,7 @@ PP(pp_system)
STATUS_NATIVE_SET(value);
do_execfree();
SP = ORIGMARK;
- PUSHi(value);
+ PUSHi(STATUS_POSIX);
#endif /* !FORK or VMS */
RETURN;
}