Date: Wed, 13 Apr 2016 21:51:17 +0300 From: Dmitry Sivachenko <trtrmitya@gmail.com> To: Johannes Jost Meixner <johannes@meixner.dk> Cc: freebsd-emulation@freebsd.org Subject: Re: Unable to exec scripts from Linuxator Message-ID: <EBBD2A49-C4C6-4D96-88D2-6D25A121F0AD@gmail.com> In-Reply-To: <570E8FF6.3090401@meixner.dk> References: <17FB69FC-A46A-4373-AF93-B9240C6742EA@gmail.com> <570E8FF6.3090401@meixner.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
> On 13 Apr 2016, at 21:29, Johannes Jost Meixner <johannes@meixner.dk> = wrote: >=20 >=20 >=20 > On 04/ 5/16 11:24 AM, Dmitry Sivachenko wrote: >> Hello, >>=20 >> 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. >>=20 >> system() fails if it tries to execute a script, not a binary: >>=20 >> $ cat test.c=20 >> #include <stdlib.h> >> #include <stdio.h> >>=20 >> void main() { >> int i =3D system("/tmp/t.sh"); >> printf("i=3D%d\n", i); >> } >> $ cat /tmp/t.sh >> #!/usr/bin/env bash >>=20 >> echo "OK" >> $ >>=20 >> Compile test.c on Linux and run on FreeBSD: >>=20 >=20 > Can you try again, with the shell script in /compat/linux/tmp/ ? >=20 >=20 Output has changed: $ /tmp/a.out=20 /compat/linux/usr/bin/env: linux/tmp/t.sh: No such file or directory $ >=20 >> $ ./a.out=20 >> /compat/linux/usr/bin/env: h: No such file or directory >> i=3D32512 >> $ >> _______________________________________________ >> freebsd-emulation@freebsd.org mailing list >> https://lists.freebsd.org/mailman/listinfo/freebsd-emulation >> To unsubscribe, send any mail to = "freebsd-emulation-unsubscribe@freebsd.org"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?EBBD2A49-C4C6-4D96-88D2-6D25A121F0AD>