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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: frederic dot hardy at mageekbox dot net
New email:
PHP Version: OS:

 

 [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: Thu Nov 21 13:01:29 2024 UTC