php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #60978
Patch wrong_exit_code.patch revision 2012-02-06 09:55 UTC by laruence@php.net
Patch patch_v1 revision 2012-02-04 20:40 UTC by php-dev at zerocue dot com

Patch patch_v1 for Scripting Engine problem Bug #60978

Patch version 2012-02-04 20:40 UTC

Return to Bug #60978 | Download this patch
Patch Revisions:

Developer: php-dev@zerocue.com

Index: cli/php_cli.c
===================================================================
--- cli/php_cli.c	(revision 323057)
+++ cli/php_cli.c	(working copy)
@@ -1023,6 +1023,8 @@
 			if (zend_eval_string_ex(exec_direct, NULL, "Command line code", 1 TSRMLS_CC) == FAILURE) {
 				exit_status=254;
 			}
+			/* zend_bailout() always returns FAILURE, go by exit status defined by executor_globals */
+			exit_status=EG(exit_status);
 			break;
 			
 		case PHP_MODE_PROCESS_STDIN:
 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Fri Apr 18 15:02:26 2014 UTC