> -----Original Message-----
> From: Richard Lynch [mailto:[EMAIL PROTECTED]
> Sent: Friday, March 02, 2007 12:35 AM
> To: [EMAIL PROTECTED]
> Cc: Roman Neuhauser; 'PHP Mailing'
> Subject: Re: [PHP] exec from process (deamon) without shell
> 
> On Thu, March 1, 2007 12:56 pm, [EMAIL PROTECTED] wrote:
> > I tried with /bin/ls but still same thing. I just found out that the
> > exitcode is -1 but the $stdout actually gives correct answer. But that
> > doesn't make sense. How can I then control what action to take
> > depending on the exitcode?
> 
> I *think* this could be the result of trying to ls a bunch of files,
> some of which you don't have permission to 'ls', so you are getting a
> partial list of stuff, but also an error code for trying to ls stuff
> you shouldn't have been doing that too, if you see what I mean...
> 
> I am hoping that your real script is a bit more complicated, as you
> currently have a shell script that runs PHP only to run a shell script
> that just does 'ls', which, really, you could probably just splat into
> your shell script without PHP being involved...
> 

[Peter Lauri - DWS Asia] 

It is a much more complicated logic, so therefore I am not using a shell
script. I will examine how perl acts on executing the same commands and if
that is catching 0 as error code I might move to run perl instead.

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

Reply via email to