Re: Re: CLI script & exec() - how to control what gets dumped on the screen.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Edward Kay wrote:
>> my fault was indeed thinking along such 'the result' lines - I did
>> not consider that stderr was not part of 'the result' and that most
>> programs seem to happily spit out their output to stderr (e.g. apache2ctl,
>> cvs, mysql to name a few that I was calling in the problem script) and yes
>> I'm still rather baffled as to why something like apache2ctl would
>> dump the string 'Syntax OK' to stderr - if ever there was some
>> user feedback
>> that *didn't* represent an error it would be 'Syntax OK'.
>>
> 
> I agree that this may seem a bit strange at first. My understanding however,
> is that stderr is used for errors and diagnostic info; stdout is used for
> output to be seen by a user.
> 
> The confusion seems to arise from the fact that when using the *nix command
> line, stderr and stdout are almost always both set as the terminal window.

ah - good explanation, thanks!

> 
> I think it would be helpful if the manual page for exec said that on *nix,
> it only captures stdout (although this is mentioned in the corresponding
> user comments).
> 
> Edward
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux