Bug #65275 [NEW]: Calling exit() in a shutdown function does not change the exit value in CLI
| From: | david at grudl dot com | Date: | Tue, 16 Jul 2013 17:44:34 +0000 |
| Subject: | Bug #65275 [NEW]: Calling exit() in a shutdown function does not change the exit value in CLI | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-180279@lists.php.net to get a copy of this message | ||
From: david at grudl dot com
Operating system:
PHP version: Irrelevant
Package: Scripting Engine problem
Bug Type: Bug
Bug description:Calling exit() in a shutdown function does not change the exit value in CLI
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 bug report at https://bugs.php.net/bug.php?id=65275&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=65275&r=trysnapshot54
Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=65275&r=trysnapshot53
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=65275&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=65275&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=65275&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=65275&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=65275&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=65275&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=65275&r=support
Expected behavior: https://bugs.php.net/fix.php?id=65275&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=65275&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=65275&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=65275&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=65275&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=65275&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=65275&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=65275&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=65275&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=65275&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=65275&r=mysqlcfg