Unable to exec scripts from Linuxator
Johannes Jost Meixner
johannes at meixner.dk
Wed Apr 13 18:29:16 UTC 2016
On 04/ 5/16 11:24 AM, Dmitry Sivachenko wrote:
> Hello,
>
> I have a C program which uses system() to execute another program. Program is compiled under Linux and I run it on fresh FreeBSD-10 using Linuxator.
>
> system() fails if it tries to execute a script, not a binary:
>
> $ cat test.c
> #include <stdlib.h>
> #include <stdio.h>
>
> void main() {
> int i = system("/tmp/t.sh");
> printf("i=%d\n", i);
> }
> $ cat /tmp/t.sh
> #!/usr/bin/env bash
>
> echo "OK"
> $
>
> Compile test.c on Linux and run on FreeBSD:
>
Can you try again, with the shell script in /compat/linux/tmp/ ?
Thanks,
Johannes
> $ ./a.out
> /compat/linux/usr/bin/env: h: No such file or directory
> i=32512
> $
> _______________________________________________
> freebsd-emulation at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-emulation
> To unsubscribe, send any mail to "freebsd-emulation-unsubscribe at freebsd.org"
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-emulation/attachments/20160413/6a10f003/attachment.sig>
More information about the freebsd-emulation
mailing list