Bug #17998: "exit();" in cli-mode sets return code to 255

From: Date: Wed, 26 Jun 2002 17:41:32 +0000
Subject: Bug #17998: "exit();" in cli-mode sets return code to 255
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-12140@lists.php.net to get a copy of this message
From: tho@e-dict.net Operating system: Linux 2.4.16 PHP version: 4.2.1 PHP Bug Type: Unknown/Other Function Bug description: "exit();" in cli-mode sets return code to 255 When using cli mode the return code of php is not set to the argument passed to "exit" but to 255 Setting the return code worked fine in 3.0.7, 4.0.6, and 4.1.2. Bug or feature? tho@dev0:~> cat test.php <? exit(20); ?> tho@dev0:~> php test.php X-Powered-By: PHP/4.2.1 Content-type: text/html tho@dev0:~> echo $? 255 tho@dev0:~> -- Edit bug report at http://bugs.php.net/?id=17998&edit=1 -- Fixed in CVS: http://bugs.php.net/fix.php?id=17998&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=17998&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=17998&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=17998&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=17998&r=support Expected behavior: http://bugs.php.net/fix.php?id=17998&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=17998&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=17998&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=17998&r=globals

« previous php.bugs (#12140) next »