Bug #18352 Updated: exit() always returns 255

From: Date: Mon, 15 Jul 2002 13:46:37 +0000
Subject: Bug #18352 Updated: exit() always returns 255
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-14209@lists.php.net to get a copy of this message
ID: 18352 Updated by: edink@php.net Reported By: tom@scl.co.uk -Status: Open +Status: Closed Bug Type: Scripting Engine problem Operating System: linux 2.2.20 PHP Version: 4.2.1 New Comment: The latest stable snapshot (4.2.2-dev) should be what you're looking for. It only contains bugfixes since the latest release (4.2.1). http://snaps.php.net/php4-STABLE-latest.tar.gz Previous Comments: ------------------------------------------------------------------------ [2002-07-15 09:42:12] tom@scl.co.uk 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 this bug report at http://bugs.php.net/?id=18352&edit=1

« previous php.bugs (#14209) next »