Bug #62294 [Opn->Csd]: register_shutdow_function() does not handle correctly exit code
| From: | nikic@php.net | Date: | Mon, 10 Aug 2020 10:55:34 +0000 |
| Subject: | Bug #62294 [Opn->Csd]: register_shutdow_function() does not handle correctly exit code | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-228486@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=62294&edit=1
ID: 62294
Updated by: nikic@php.net
Reported by: frederic dot hardy at mageekbox dot net
Summary: register_shutdow_function() does not handle
correctly exit code
-Status: Open
+Status: Closed
Type: Bug
Package: Scripting Engine problem
Operating System: Mac OS X
PHP Version: 5.4.3
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of nikita.ppv@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=c439f1fa6a724bfd988d3832f6dc9faece4ea657
Log: Fixed bug #62294
Previous Comments:
------------------------------------------------------------------------
[2012-06-11 15:02:36] frederic dot hardy at mageekbox dot net
Description:
------------
When a fatal error is throwed in a callback used with
register_shutdown_function(), php exit code is 0 instead of 255.
There is no problem with PHP < 5.4
Test script:
---------------
<?php
register_shutdown_function(function()
{
require 'path/to/an/unknown/file';
}
);
Expected result:
----------------
# php testScript.php
# echo $?
255
Actual result:
--------------
# php testScript.php
# echo $?
0
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=62294&edit=1