diff options
author | Sascha Schumann <sas@php.net> | 2000-11-22 04:24:35 +0000 |
---|---|---|
committer | Sascha Schumann <sas@php.net> | 2000-11-22 04:24:35 +0000 |
commit | 2ef6b689e8f3c5ddd62c790f8f429cece8a57ff9 (patch) | |
tree | b0c1a87d87629096217cb614ed05c4f4e55d0418 | |
parent | 6c1af2031098a170194f1d5e9bab34eb24185461 (diff) | |
download | php-git-2ef6b689e8f3c5ddd62c790f8f429cece8a57ff9.tar.gz |
Pass on the exit status
-rw-r--r-- | Zend/zend_execute.c | 8 | ||||
-rw-r--r-- | Zend/zend_globals.h | 1 |
2 files changed, 8 insertions, 1 deletions
diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index 4c4e97492d..eb61393b69 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -2280,7 +2280,13 @@ send_by_ref: NEXT_OPCODE(); case ZEND_EXIT: if (opline->op1.op_type != IS_UNUSED) { - zend_print_variable(get_zval_ptr(&opline->op1, Ts, &EG(free_op1), BP_VAR_R)); + zval *ptr; + + ptr = get_zval_ptr(&opline->op1, Ts, &EG(free_op1), BP_VAR_R); + if (Z_TYPE_P(ptr) == IS_LONG) { + EG(exit_status) = Z_LVAL_P(ptr); + } + zend_print_variable(ptr); FREE_OP(&opline->op1, EG(free_op1)); } zend_bailout(); diff --git a/Zend/zend_globals.h b/Zend/zend_globals.h index 821a606a42..50a2f6f069 100644 --- a/Zend/zend_globals.h +++ b/Zend/zend_globals.h @@ -151,6 +151,7 @@ struct _zend_executor_globals { int error_reporting; int orig_error_reporting; + int exit_status; zend_op_array *active_op_array; |