Bug #18352: exit() always returns 255
| From: | tom at scl dot co dot uk | Date: | Mon, 15 Jul 2002 13:42:13 +0000 |
| Subject: | Bug #18352: exit() always returns 255 | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-14208@lists.php.net to get a copy of this message | ||
From: tom@scl.co.uk
Operating system: linux 2.2.20
PHP version: 4.2.1
PHP Bug Type: Scripting Engine problem
Bug description: exit() always returns 255
First of all, I know that this is fixed in CVS with Zend 2, and I assume it
is fixed on CVS php without Zend 2 BUT, we need a stable version with
exit() working properly! So if someone can send a patch or something that
would be good enough.
Here's the problem
In the manual it says that if you hand exit() an integer the script will
return that value as the exit code and if you hand exit() a string it will
print the string (to stderr I think) then exit. When you exit with a
string there is no problem and the return code is 255, but when you exit
with a number the return code is still 255.
Code to demonstrate the bug:
<?php
exit(5);
?>
This used to work in a version before 4.2.1 (not too sure which) but not
it seems to have be broken for 4.2.1
Thanks
--
Edit bug report at http://bugs.php.net/?id=18352&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=18352&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=18352&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=18352&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=18352&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=18352&r=support
Expected behavior: http://bugs.php.net/fix.php?id=18352&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=18352&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=18352&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=18352&r=globals