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

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

Thread Next
From:
Ben Greear
Date:
September 4, 2013 16:50
Subject:
Question on porting perl 5.16 to Android (no /bin/sh)
Message ID:
522764BE.6020303@candelatech.com
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?

Thanks,
Ben

-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About