Re: cvs: phpdoc /en/features commandline.xml
| From: | Hannes Magnusson | Date: | Sun, 16 Nov 2008 02:29:20 +0000 |
| Subject: | Re: cvs: phpdoc /en/features commandline.xml | ||
| References: | 1 2 3 4 | Groups: | php.internals php.doc.cvs |
| Request: | Send a blank email to internals+get-41934@lists.php.net to get a copy of this message | ||
On Mon, Nov 10, 2008 at 12:05, Hannes Magnusson
<hannes.magnusson@gmail.com> wrote:
> On Mon, Nov 10, 2008 at 11:10, Jakub Vrana <vrana@php.net> wrote:
>>> Not true:
>>> $ php -l t.php; echo $?
>>
>>> Parse error: syntax error, unexpected $end in t.php on line 3
>>> Errors parsing t.php
>>> 255
>>
>> In which PHP version and in which OS? Because in
>> http://lxr.php.net/ident?i=php_lint_script I see FAILURE
>> and in
>> http://lxr.php.net/ident?i=FAILURE I see -1 which is the
>> number that
>> PHP 5.2.6 under Windows really returns.
>
> I'm running Linux, Ubuntu, and FreeBSD.
>
> Your reading of the code is correct, however:
> "The value of status may be 0, EXIT_SUCCESS, EXIT_FAILURE, or any other
> value, though only the least significant 8 bits (that is, status &
> 0377) shall be available to a waiting parent process."
>
> The same rules apply to the userland exit() function.
>
> Maybe we should fix the exist status here, manually setting it to 255
> in the else clause of php_cli.c:1138?
There are few other exit()s that use negative values..
If there are no objections I will change them all to actual POSIX
values on monday. (i.e -1 will be 255, -2 254..).
-Hannes