From 86fa2d39379752044287530f31f21532380eeb19 Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Thu, 14 Feb 2002 20:16:08 +0000 Subject: - Let php_execute_script return 0 on failure and 1 on sucess, and change SAPIs accordingly. (Andrei, Derick) --- sapi/cli/php_cli.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'sapi/cli/php_cli.c') diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c index 4bcb0e3357..cf6ffdcd70 100644 --- a/sapi/cli/php_cli.c +++ b/sapi/cli/php_cli.c @@ -552,7 +552,11 @@ int main(int argc, char *argv[]) switch (behavior) { case PHP_MODE_STANDARD: - exit_status = php_execute_script(&file_handle TSRMLS_CC); + if (php_execute_script(&file_handle TSRMLS_CC)) { + exit_status = EG(exit_status); + } else { + exit_status = -1; + } break; case PHP_MODE_LINT: PG(during_request_startup) = 0; -- cgit v1.2.1