RE: exec from process (deamon) without shell

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

 



> -----Original Message-----
> From: Richard Lynch [mailto:ceo@xxxxxxxxx]
> Sent: Friday, March 02, 2007 12:35 AM
> To: lists@xxxxxxxxxxx
> Cc: Roman Neuhauser; 'PHP Mailing'
> Subject: Re:  exec from process (deamon) without shell
> 
> On Thu, March 1, 2007 12:56 pm, lists@xxxxxxxxxxx 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


[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