php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #62294 register_shutdow_function() does not handle correctly exit code
Submitted: 2012-06-11 15:02 UTC Modified: -
Votes:12
Avg. Score:4.5 ± 0.6
Reproduced:10 of 10 (100.0%)
Same Version:10 (100.0%)
Same OS:5 (50.0%)
From: frederic dot hardy at mageekbox dot net Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 5.4.3 OS: Mac OS X
Private report: No CVE-ID: None
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
39 - 7 = ?
Subscribe to this entry?

 
 [2012-06-11 15:02 UTC] 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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-08-10 10:55 UTC] nikic@php.net
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
 [2020-08-10 10:55 UTC] nikic@php.net
-Status: Open +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Oct 07 04:01:27 2024 UTC