Bug #65275 [Opn]: Calling exit() in a shutdown function does not change the exit value in CLI
| From: | laruence@php.net | Date: | Wed, 17 Jul 2013 14:56:19 +0000 |
| Subject: | Bug #65275 [Opn]: Calling exit() in a shutdown function does not change the exit value in CLI | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-180292@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=65275&edit=1
ID: 65275
Updated by: laruence@php.net
Reported by: david at grudl dot com
Summary: Calling exit() in a shutdown function does not
change the exit value in CLI
Status: Open
Type: Bug
Package: Scripting Engine problem
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
the problem here is, we don't know whether there was a new exit_status set to
EG(exit_status) in request_shutdown phase..
Previous Comments:
------------------------------------------------------------------------
[2013-07-16 17:50:58] david at grudl dot com
(btw numbers #65275 and #62725 are similar too :-)
------------------------------------------------------------------------
[2013-07-16 17:44:34] david at grudl dot com
Description:
------------
This code is exited with error code 111 in CGI, but under CLI the error code remains 255.
register_shutdown_function(function(){
die(111);
});
die(255);
This bug is similar to https://bugs.php.net/bug.php?id=62725, but there
is big difference between die(0) and die(255).
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=65275&edit=1