develooper Front page | perl.perl5.porters | Postings from September 2013

Question on porting perl 5.16 to Android (no /bin/sh)

Thread Next
Ben Greear
September 4, 2013 16:50
Question on porting perl 5.16 to Android (no /bin/sh)
Message ID:
I used the perldroid project to cross-compile perl 5.16 for android (ARM) using
the latest Android NDK stand-alone toolchain.  After hacking on perldroid to
fix a few things I got a mostly-working perl binary & libraries.

One problem remains however.  If I have perl code that does something like this,
it will not work:

my @foo =  `ls run_*.PID 2>/dev/null`;

I think this might be because Android has no /bin/sh.  Instead, it puts the shell
at /system/bin/sh.

Maybe lacking /bin/sh perl uses some interal minimal fake shell and thus fails to handle
more advanced system calls?

Anyone know if perl can be configured to use a different shell by default, or where
the code is that could be changed to use /system/bin/sh?


Ben Greear <>
Candela Technologies Inc

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About