On Fri, 2003-08-01 at 16:45, Dan wrote:
> > #include <stdlib.h>
> > #include <stdio.h>
> > 
> > int main() {
> > 
> >         int ret;
> > 
> >         ret = system("/bin/ls > /dev/null");
> > 
> >         printf("system(\"/bin/ls > /dev/null\") returned %d\n", ret);
> > 
> >         return(ret);
> > }
> > 
> > gcc mysystem.c -o mysystem
> > ./mysystem
> > 
> > what is the output?
> 
> On Fri, 2003-08-01 at 10:40, Dan wrote:
> > This is the result:
> > 
> > [EMAIL PROTECTED] temp]# ./mysystem
> > system("/bin/ls > /dev/null") returned 0
> > [EMAIL PROTECTED] temp]#
> 
> Okay, that at least rules out the suggestion earlier in this thread that
> your systems' system call is broken.

(line below moved down from top back into context)
> Then?
> What can it be?

Don't know really. I'd change app_system.c, to tell me what the exact
return code we got:
... 
        /* Do our thing here */
        res = system((char *)data);
        if (res < 0) {
                ast_log(LOG_WARNING, "Unable to execute '%s' (result
%d)\n", (char *)data, res);
                res = -1;
        } else if (res == 127) {
                ast_log(LOG_WARNING, "Unable to execute '%s' (result
%d)\n", (char *)data);
                res = -1;
        }
...

and recompile and install app_system.so. It would help you to know what
the return code was that is causing you problems. I'm not sure how that
would help you, but it is the one thing I can think of that would get
you more information.

wkr,

-- 
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in email?

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to