#19224 [Opn->Csd]: no way to return 0 exit status in CLI
| From: | derick@php.net | Date: | Wed, 04 Sep 2002 07:31:42 +0000 |
| Subject: | #19224 [Opn->Csd]: no way to return 0 exit status in CLI | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-18390@lists.php.net to get a copy of this message | ||
ID: 19224
Updated by: derick@php.net
Reported By: tdv@edisoft.ru
-Status: Open
+Status: Closed
Bug Type: Feature/Change Request
PHP Version: 4.2.2
New Comment:
Fixed in CVS, and this will be fixed as soon as 4.2.3 comes out:
[derick@kossu /tmp]$ php-4.2.3RC2
<?php
exit(0);
?>
[derick@kossu /tmp]$ echo $?
0
Derick
Previous Comments:
------------------------------------------------------------------------
[2002-09-04 02:22:56] tdv@edisoft.ru
The command line interface CLI of PHP could NOT return 0 (zero) exit
status from the script.
I look through the source and found folowing code (in
sapi/cli/php_cli.c:586:
switch (behavior) {
case PHP_MODE_STANDARD:
if (php_execute_script(&file_handle TSRMLS_CC)) {
exit_status = EG(exit_status);
} else {
exit_status = 255;
}
break;
As I see, there is NO way to return 0 (normal) exit status.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=19224&edit=1