Re: exec from process (deamon) without shell
| From: | Richard Lynch | Date: | Thu, 01 Mar 2007 22:34:36 +0000 |
| Subject: | Re: exec from process (deamon) without shell | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-249682@lists.php.net to get a copy of this message | ||
On Thu, March 1, 2007 12:56 pm, lists@dwsasia.com 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...
--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?