system() problem

I have a Motorola Sandpoint system that I have running. Just the minimum
right now, Ethernet support, hd support. However I have a simple hello
program that will write hello to the screen (which works). In addition I
tried to make a system() call to ls - system(“ls”). I was expecting to see a
directory listing, but I don’t.

The program is as follows, and it works when I compile it for x86 and run it
on my development system.
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
int main()
{
int ret;
printf(“hello”);
ret = system(“ls”);
printf(“Error:%s”, strerror(errno));
}

When run I get the following output:
hello
Error:No such file or directory
Process 28681 (hello) exited status=46.

I know that the command ls is located in /proc/boot and I can perform an ls
from the command line of the sandpoint system. I am thinking that I need to
include something else in my OS image, but don’t know what? (Included for
reference)

Anyone have any ideas?
Thanks in advance!
Mike



begin 666 sandpoint-flash.build.4.hello
M(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C
M(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C"B,(R!.975T<FEN;R!O
M;B!T:&4@4V%N9’!O:6YT($UO=&]R;VQA(%-04R!E=F%L=6%T:6]N(’!L871F
M;W)M"B,
(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C
M(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C"B,(R!);G1E
M<G)U<‘0@07-S:6=N;65N=’,
(R M+2TM+2TM+2TM+2TM+2TM+2TM+2T*(R!0
M34,@,3 W+T5024,@:6YT97)R=7!T<PHC"B,@=F5C=&]R.@DP"B,@=’)I9V=E
M<CH);&5V96P*(R!D979I8V4Z"5!-0S(@:6YT97)R=7!T(“AS;&]T(#,@24Y4
M02P@8V%S8V%D92!F<F]M(’=I;F)O;F0I"B,(R!V96-T;W(Z"3$(R!T<FEG
M9V5R.@EL979E; HC(&1E=FEC93H)4$U#,PHC"B,@=F5C=&]R.@DR"B,@=’)I
M9V=E<CH);&5V96P*(R!D979I8V4Z"5!-0S (PHC('9E8W1O<CH),PHC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T(#T@PH)9&ES<&QA>5]M<V<@4W1A<G1I
M;F<“61E=F,M<V5R.#(U,” M92 M8S$X-#8R,# @+6(Q,34R,# @,'AF93 P
M,#-F."PQ,#0@,'AF93 P,#)F.“PQ,#,@)B @( H)<F5O<&5N(” "61I<W!L
M87E?;7-G(%=E;&-O;64@=&@3F5U=’)I;F@;VX@82!386YD<&]I;G0@=R]%
M;F5T)DA$(%-U<’!O<G0
"0H)(RHJ
BI4:&5S92!E;G8@=F%R:6%B;&5S(&EN
M:&5R:71E9”!B>2!A;&P@=&AE(’!R;V=R86US(’=H:6-H(&9O;&QO=RHJBH
M(" @(%-94TY!344];G1O"B @("!415)-/7%A;G-I"B @("!0051(/2]P<F]C
M+V)O;W0*“B @(” CBHJG-T87)T(‘1H92!P:7!E(&UA;F%G97(JBHJ"@EP
M:7!E("8
"7=A:71F;W(@+V1E=B]P:7!E"@H@(" @(RHJBIO<&5N(‘1H92!S
M97)I86P@<&]R=’,J
BHJ"@ER96]P96X@+V1E=B]S97(R"@E;W-E<W-I;VX@
M<’)I/3,P72!0051(/2]B:6XZ+W!R;V,O8F]O="!E<V@@)@H)<F5O<&5N("]D
M978O<V5R,0H)6RMS97-S:6]N72!0051(/2]B:6XZ+W!R;V,O8F]O="!E<V@@
M)@H
(" @(",JBHJ<W1A<G0@=&AE(’!C:2!B=7,JBHJ"@EP8VDM<V%N9’!O
M:6YT(“8*“7=A:71F;W(@+V1E=B]P8VD*”@H@(” @(RHJBI3=&%R="!T:&4@
M16YE="!$<FEV97)S
BHJ*@H)(R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O
M+R\O+R\O+R\O+R\O+R\O+R\O+R\O(" “2-S=&%R=”!T:&4@971H97)N970@
M8V%R9"!D<FEV97(@9F]R('1H92!L:6YK<WES"B,):6\M;F5T("UD='5L:7 @
M+7!T=&-P:7 @:68]96XP.C$P+C(P,"XS."XR,C,
“2-S=&%R=”!T:&4@971H
M97)N970@8V%R9"!D<FEV97(@9F]R('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@&%U=&]M;W5N="!C;60@:6X@=&AE(&1E=F(M96ED
M92DJ
BHJ"FEO+6)L:RYS;PHCBHJD-O;6UO;B!!8V-E<W,@365T:&]D(&9O
M<B!H87)D(&1I<VMSBHJ@IC86TM9&ES:RYS;PHC+R\O+R\O+R\O+R\O+R\O
M+R\O+R\O+R\O+R\O+R\O+R\O+R\O"B,JBHJ:6YC;'5D92!T:&4@9&]S(&9S
M
BHJ*@HC9G,M9&]S+G-O"B,JBHJ:6YC;'5D92!T:&4@<6YX(&9SBHJ*@IF
M<RUQ;G@T+G-O"B,O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O
M+R*“B,JBHJ:6YC;‘5D92!T:&4@9F]L;&]W:6YG(’)U;FYA8FQE(&-O;6UA
M;F1S
BHJ*@I;9&%T83UC70ID979C+7-E<C@R-3 9&5V8BUE:61E"FEO+6YE
M= IP8VDM<V%N9’!O:6YT"G!C:0IE<V@
;&5S<PIL<PIM;W5N= IP:6YG"G!I
M9&EN"F=R97 <&EP90HCBHJF9O<B!I;FET:6%L:7II;F<@82!N97<@9’)I
M=F4J
BHJ"B,JBHJ4V5T=&EN9R!T:&4@<&%R=&ET:6]N(%1A8FQEBHJ*@IF
M9&ES:PHCBHJDEN:71I86QI>F4@:&%R9”!D:7-KBHJ@ID:6YI= HCBHJ
M
D-H86-K(&9O<B!B860@8FQO8VMS(&]N(&1I<VLJBHJ"F1C:&5C:PHCBHJ
ME5S92!I;B!D96QE=&EN9R!T:&4@<&%R=&ET:6]N('1A8FQEBHJ*@ID9 HC
MBHJDEN8VQU9&4@;7D@87!P;&EC871I;VX@:6X@=&AE(&EM86=E*BHJ"B]H
:;VUE+W1O<F5N;R]B:’,O=&5S="]H96QL;PH
end

Mike Toreno <no.spam@address.com> wrote:

I have a Motorola Sandpoint system that I have running. Just the minimum
right now, Ethernet support, hd support. However I have a simple hello
program that will write hello to the screen (which works). In addition I
tried to make a system() call to ls - system(“ls”). I was expecting to see a
directory listing, but I don’t.

The program is as follows, and it works when I compile it for x86 and run it
on my development system.
#include <stdio.h
#include <stdlib.h
#include <errno.h
int main()
{
int ret;
printf(“hello”);
ret = system(“ls”);
printf(“Error:%s”, strerror(errno));
}

When run I get the following output:
hello
Error:No such file or directory
Process 28681 (hello) exited status=46.

I know that the command ls is located in /proc/boot and I can perform an ls
from the command line of the sandpoint system. I am thinking that I need to
include something else in my OS image, but don’t know what? (Included for
reference)

You need “sh” to make “system()” works. Check out:

http://cvs.qnx.com/cgi-bin/cvsweb.cgi/lib/c/1a/system.c

-xtang

Anyone have any ideas?
Thanks in advance!
Mike



begin 666 sandpoint-flash.build.4.hello
M(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C
M(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C"B,(R!.975T<FEN;R!O
M;B!T:&4@4V%N9’!O:6YT($UO=&]R;VQA(%-04R!E=F%L=6%T:6]N(’!L871F
M;W)M"B,
(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C
M(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C"B,(R!);G1E
M<G)U<‘0@07-S:6=N;65N=’,
(R M+2TM+2TM+2TM+2TM+2TM+2TM+2T*(R!0
M34,@,3 W+T5024,@:6YT97)R=7!T<PHC"B,@=F5C=&]R.@DP"B,@=’)I9V=E
M<CH);&5V96P*(R!D979I8V4Z"5!-0S(@:6YT97)R=7!T(“AS;&]T(#,@24Y4
M02P@8V%S8V%D92!F<F]M(’=I;F)O;F0I"B,(R!V96-T;W(Z"3$(R!T<FEG
M9V5R.@EL979E; HC(&1E=FEC93H)4$U#,PHC"B,@=F5C=&]R.@DR"B,@=’)I
M9V=E<CH);&5V96P*(R!D979I8V4Z"5!-0S (PHC('9E8W1O<CH),PHC('1R
M:6=G97(Z"6QE=F5L"B,@9&5V:6-E.@E034,Q"B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,M<V5R.#(U,” M92 M8S$X-#8R,# @+6(Q,34R,# @,'AF93 P
M,#-F."PQ,#0@,'AF93 P,#)F.“PQ,#,@)B @( H)<F5O<&5N(” "61I<W!L
M87E?;7-G(%=E;&-O;64@=&@3F5U=’)I;F@;VX@82!386YD<&]I;G0@=R]%
M;F5T)DA$(%-U<’!O<G0
"0H)(RHJ
BI4:&5S92!E;G8@=F%R:6%B;&5S(&EN
M:&5R:71E9”!B>2!A;&P@=&AE(’!R;V=R86US(’=H:6-H(&9O;&QO=RHJBH
M(" @(%-94TY!344];G1O"B @("!415)-/7%A;G-I"B @("!0051(/2]P<F]C
M+V)O;W0*“B @(” CBHJG-T87)T(‘1H92!P:7!E(&UA;F%G97(JBHJ"@EP
M:7!E("8
"7=A:71F;W(@+V1E=B]P:7!E"@H@(" @(RHJBIO<&5N(‘1H92!S
M97)I86P@<&]R=’,J
BHJ"@ER96]P96X@+V1E=B]S97(R"@E;W-E<W-I;VX@
M<’)I/3,P72!0051(/2]B:6XZ+W!R;V,O8F]O="!E<V@@)@H)<F5O<&5N("]D
M978O<V5R,0H)6RMS97-S:6]N72!0051(/2]B:6XZ+W!R;V,O8F]O="!E<V@@
M)@H
(" @(",JBHJ<W1A<G0@=&AE(’!C:2!B=7,JBHJ"@EP8VDM<V%N9’!O
M:6YT(“8*“7=A:71F;W(@+V1E=B]P8VD*”@H@(” @(RHJBI3=&%R="!T:&4@
M16YE="!$<FEV97)S
BHJ*@H)(R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O
M+R\O+R\O+R\O+R\O+R\O+R\O+R\O(" “2-S=&%R=”!T:&4@971H97)N970@
M8V%R9"!D<FEV97(@9F]R('1H92!L:6YK<WES"B,):6\M;F5T("UD='5L:7 @
M+7!T=&-P:7 @:68]96XP.C$P+C(P,"XS."XR,C,
“2-S=&%R=”!T:&4@971H
M97)N970@8V%R9"!D<FEV97(@9F]R('1H92!I;G1E; H):6\M;F5T(“UD<W!E
M961O(“UP='1C<&EP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
BHJ"FEO+6)L:RYS;PHCBHJD-O;6UO;B!!8V-E<W,@365T:&]D(&9O
M<B!H87)D(&1I<VMSBHJ@IC86TM9&ES:RYS;PHC+R\O+R\O+R\O+R\O+R\O
M+R\O+R\O+R\O+R\O+R\O+R\O+R\O"B,JBHJ:6YC;'5D92!T:&4@9&]S(&9S
M
BHJ*@HC9G,M9&]S+G-O"B,JBHJ:6YC;'5D92!T:&4@<6YX(&9SBHJ*@IF
M<RUQ;G@T+G-O"B,O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O
M+R*“B,JBHJ:6YC;‘5D92!T:&4@9F]L;&]W:6YG(’)U;FYA8FQE(&-O;6UA
M;F1S
BHJ*@I;9&%T83UC70ID979C+7-E<C@R-3 9&5V8BUE:61E"FEO+6YE
M= IP8VDM<V%N9’!O:6YT"G!C:0IE<V@
;&5S<PIL<PIM;W5N= IP:6YG"G!I
M9&EN"F=R97 <&EP90HCBHJF9O<B!I;FET:6%L:7II;F<@82!N97<@9’)I
M=F4J
BHJ"B,JBHJ4V5T=&EN9R!T:&4@<&%R=&ET:6]N(%1A8FQEBHJ*@IF
M9&ES:PHCBHJDEN:71I86QI>F4@:&%R9”!D:7-KBHJ@ID:6YI= HCBHJ
M
D-H86-K(&9O<B!B860@8FQO8VMS(&]N(&1I<VLJBHJ"F1C:&5C:PHCBHJ
ME5S92!I;B!D96QE=&EN9R!T:&4@<&%R=&ET:6]N('1A8FQEBHJ*@ID9 HC
MBHJDEN8VQU9&4@;7D@87!P;&EC871I;VX@:6X@=&AE(&EM86=E*BHJ"B]H
:;VUE+W1O<F5N;R]B:’,O=&5S="]H96QL;PH
end

I still may be doing something wrong, but I compiled the system.c file and
ran it on my (x86)development system and it worked. When I compiled it for
my (ppc) host system and run it I get the an error:

#system pwd
system returned -1
Error:No such file or directory
Process xxx (system) exited with status 39

I am thinking there is still something that is not being included in my
buildfile, but I don’t know what it could be?

Thanks,
Mike
“Mike Toreno” <no.spam@address.com> wrote in message
news:a53l7b$avm$1@nntp.qnx.com

I have a Motorola Sandpoint system that I have running. Just the minimum
right now, Ethernet support, hd support. However I have a simple hello
program that will write hello to the screen (which works). In addition I
tried to make a system() call to ls - system(“ls”). I was expecting to see
a
directory listing, but I don’t.

The program is as follows, and it works when I compile it for x86 and run
it
on my development system.
#include <stdio.h
#include <stdlib.h
#include <errno.h
int main()
{
int ret;
printf(“hello”);
ret = system(“ls”);
printf(“Error:%s”, strerror(errno));
}

When run I get the following output:
hello
Error:No such file or directory
Process 28681 (hello) exited status=46.

I know that the command ls is located in /proc/boot and I can perform an
ls
from the command line of the sandpoint system. I am thinking that I need
to
include something else in my OS image, but don’t know what? (Included for
reference)

Anyone have any ideas?
Thanks in advance!
Mike
\

Sorry, forgot to include sh in the [data=c]portion of the buildfile… Thanks
much for the help Xiaodan!

“Mike Toreno” <no.spam@address.com> wrote in message
news:a55hsn$mdq$1@nntp.qnx.com

I still may be doing something wrong, but I compiled the system.c file and
ran it on my (x86)development system and it worked. When I compiled it for
my (ppc) host system and run it I get the an error:

#system pwd
system returned -1
Error:No such file or directory
Process xxx (system) exited with status 39

I am thinking there is still something that is not being included in my
buildfile, but I don’t know what it could be?

Thanks,
Mike
“Mike Toreno” <> no.spam@address.com> > wrote in message
news:a53l7b$avm$> 1@nntp.qnx.com> …
I have a Motorola Sandpoint system that I have running. Just the minimum
right now, Ethernet support, hd support. However I have a simple hello
program that will write hello to the screen (which works). In addition I
tried to make a system() call to ls - system(“ls”). I was expecting to
see
a
directory listing, but I don’t.

The program is as follows, and it works when I compile it for x86 and
run
it
on my development system.
#include <stdio.h
#include <stdlib.h
#include <errno.h
int main()
{
int ret;
printf(“hello”);
ret = system(“ls”);
printf(“Error:%s”, strerror(errno));
}

When run I get the following output:
hello
Error:No such file or directory
Process 28681 (hello) exited status=46.

I know that the command ls is located in /proc/boot and I can perform an
ls
from the command line of the sandpoint system. I am thinking that I need
to
include something else in my OS image, but don’t know what? (Included
for
reference)

Anyone have any ideas?
Thanks in advance!
Mike


\