if (PL_top_env->je_prev) \
PerlProc_longjmp(PL_top_env->je_buf, (v)); \
if ((v) == 2) \
- PerlProc_exit(STATUS_NATIVE_EXPORT); \
+ PerlProc_exit(STATUS_EXIT); \
PerlIO_printf(PerlIO_stderr(), "panic: top_env\n"); \
PerlProc_exit(1); \
} STMT_END
if (IoTYPE(io) == IoTYPE_PIPE) {
const int status = PerlProc_pclose(IoIFP(io));
if (not_implicit) {
- STATUS_NATIVE_SET(status);
+ STATUS_NATIVE_CHILD_SET(status);
retval = (STATUS_UNIX == 0);
}
else {
if (CALL_FPTR(PL_threadhook)(aTHX)) {
/* Threads hook has vetoed further cleanup */
- return STATUS_NATIVE_EXPORT;
+ return STATUS_EXIT;
}
#ifdef DEBUG_LEAKING_SCALARS_FORK_DUMP
#endif
/* The exit() function will do everything that needs doing. */
- return STATUS_NATIVE_EXPORT;
+ return STATUS_EXIT;
}
/* jettison our possibly duplicated environment */
Safefree(PL_mess_sv);
PL_mess_sv = Nullsv;
}
- return STATUS_NATIVE_EXPORT;
+ return STATUS_EXIT;
}
/*
PL_curstash = PL_defstash;
if (PL_checkav)
call_list(oldscope, PL_checkav);
- ret = STATUS_NATIVE_EXPORT;
+ ret = STATUS_EXIT;
break;
case 3:
PerlIO_printf(Perl_error_log, "panic: top_env\n");
if (PerlEnv_getenv("PERL_DEBUG_MSTATS"))
dump_mstats("after execution: ");
#endif
- ret = STATUS_NATIVE_EXPORT;
+ ret = STATUS_EXIT;
break;
case 3:
if (PL_restartop) {
STATUS_ALL_FAILURE;
break;
default:
- STATUS_NATIVE_SET(status);
+ STATUS_UNIX_SET(status);
break;
}
my_exit_jump();
#define STATUS_UNIX PL_statusvalue
#ifdef VMS
# define STATUS_NATIVE PL_statusvalue_vms
-# define STATUS_NATIVE_EXPORT \
+# define STATUS_EXIT \
(((I32)PL_statusvalue_vms == -1 ? 44 : PL_statusvalue_vms) | (VMSISH_HUSHED ? 0x10000000 : 0))
# define STATUS_NATIVE_SET(n) STATUS_NATIVE_SET_PORC(n, 0)
# define STATUS_NATIVE_CHILD_SET(n) STATUS_NATIVE_SET_PORC(n, 1)
# define STATUS_ALL_FAILURE (PL_statusvalue = 1, PL_statusvalue_vms = 44)
#else
# define STATUS_NATIVE PL_statusvalue_posix
-# define STATUS_NATIVE_EXPORT STATUS_NATIVE
# if defined(WCOREDUMP)
-# define STATUS_NATIVE_CHILD_SET(n) STATUS_NATIVE_SET(n)
-# define STATUS_NATIVE_SET(n) \
+# define STATUS_NATIVE_CHILD_SET(n) \
STMT_START { \
PL_statusvalue_posix = (n); \
if (PL_statusvalue_posix == -1) \
} \
} STMT_END
# elif defined(WIFEXITED)
-# define STATUS_NATIVE_CHILD_SET(n) STATUS_NATIVE_SET(n)
-# define STATUS_NATIVE_SET(n) \
+# define STATUS_NATIVE_CHILD_SET(n) \
STMT_START { \
PL_statusvalue_posix = (n); \
if (PL_statusvalue_posix == -1) \
} \
} STMT_END
# else
-# define STATUS_NATIVE_CHILD_SET(n) STATUS_NATIVE_SET(n)
-# define STATUS_NATIVE_SET(n) \
+# define STATUS_NATIVE_CHILD_SET(n) \
STMT_START { \
PL_statusvalue_posix = (n); \
if (PL_statusvalue_posix == -1) \
# define STATUS_UNIX_SET(n) \
STMT_START { \
PL_statusvalue = (n); \
- PL_statusvalue_posix = PL_statusvalue; \
if (PL_statusvalue != -1) \
PL_statusvalue &= 0xFFFF; \
} STMT_END
# define STATUS_CURRENT STATUS_UNIX
+# define STATUS_EXIT STATUS_UNIX
# define STATUS_ALL_SUCCESS (PL_statusvalue = 0, PL_statusvalue_posix = 0)
# define STATUS_ALL_FAILURE (PL_statusvalue = 1, PL_statusvalue_posix = 1)
#endif
TAINT; /* "I believe that this is not gratuitous!" */
}
else {
- STATUS_NATIVE_SET(-1);
+ STATUS_NATIVE_CHILD_SET(-1);
if (gimme == G_SCALAR)
RETPUSHUNDEF;
}
(void)rsignal_restore(SIGINT, &ihand);
(void)rsignal_restore(SIGQUIT, &qhand);
#endif
- STATUS_NATIVE_SET(result == -1 ? -1 : status);
+ STATUS_NATIVE_CHILD_SET(result == -1 ? -1 : status);
do_execfree(); /* free any memory child malloced on fork */
SP = ORIGMARK;
if (did_pipes) {
if (n != sizeof(int))
DIE(aTHX_ "panic: kid popen errno read");
errno = errkid; /* Propagate errno from kid */
- STATUS_CURRENT = -1;
+ STATUS_NATIVE_CHILD_SET(-1);
}
}
PUSHi(STATUS_CURRENT);
h_errno = PL_reentrant_buffer->_gethostent_errno;
# endif
#endif
- STATUS_NATIVE_SET(h_errno);
+ STATUS_UNIX_SET(h_errno);
}
#endif
h_errno = PL_reentrant_buffer->_getnetent_errno;
# endif
#endif
- STATUS_NATIVE_SET(h_errno);
+ STATUS_UNIX_SET(h_errno);
}
#endif
PL_curstash = PL_defstash;
if (PL_endav && !PL_minus_c)
call_list(oldscope, PL_endav);
- status = STATUS_NATIVE_EXPORT;
+ status = STATUS_EXIT;
break;
case 3:
if (PL_restartop) {
PL_curstash = PL_defstash;
if (PL_endav && !PL_minus_c)
call_list(oldscope, PL_endav);
- status = STATUS_NATIVE_EXPORT;
+ status = STATUS_EXIT;
break;
case 3:
if (PL_restartop) {