Dianne, this one is for you !
On Feb 11, 1:54 pm, Corey wrote:
> Currently I am trying to write an application in Android GUI.
> One of the function will need to call one of the shell script in /
> system/xbin/.
> I write an API in C by using system("/system/xbin/test.sh"); funtion,
> and then
you can't use system() to call a shell script, you need to invoke the shell
interpreter instead, with something like "/system/xbin/sh
/system/xbin/test.sh"
On Wed, Feb 11, 2009 at 1:54 PM, Corey wrote:
>
> Currently I am trying to write an application in Android GUI.
> One of the function will n
On Feb 11, 8:13 am, David Turner wrote:
> you can't use system() to call a shell script, you need to invoke the shell
> interpreter instead, with something like "/system/xbin/sh
> /system/xbin/test.sh"
I tried it just now from a trivial C program; worked fine. I'm not
sure why it would be diffe
On Wed, Feb 11, 2009 at 7:32 PM, fadden wrote:
>
> On Feb 11, 8:13 am, David Turner wrote:
> > you can't use system() to call a shell script, you need to invoke the
> shell
> > interpreter instead, with something like "/system/xbin/sh
> > /system/xbin/test.sh"
>
> I tried it just now from a triv
Actually, I retract that, after checking our implementation, it always do a
"sh -c " so calling a shell script should work.
Have you tried checking the return value and errno after the call ?
On Wed, Feb 11, 2009 at 10:35 PM, David Turner wrote:
>
>
> On Wed, Feb 11, 2009 at 7:32 PM, fadden wro
On Wed, Feb 11, 2009 at 4:54 AM, Corey wrote:
> Currently I am trying to write an application in Android GUI.
> One of the function will need to call one of the shell script in /
> system/xbin/.
> I write an API in C by using system("/system/xbin/test.sh"); funtion,
> and then my Java code will u
I also try to do something(a command, not a script) with system(), it
always does not work.
system() return value is 256(-1),
according to ./bionic/libc/unistd/system.c
is that means fork() error?
On Feb 12, 9:52 am, Dan Bornstein wrote:
> On Wed, Feb 11, 2009 at 4:54 AM, Corey wrote:
> > Curr
-1 means you should look at errno / strerror(errno) for information about
the error
a >= 0 would correspond to the exit status of the process you invoked
On Fri, Feb 13, 2009 at 1:43 AM, Dig wrote:
>
> I also try to do something(a command, not a script) with system(), it
> always does not work.