Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Apr 2016 21:29:10 +0300
From:      Johannes Jost Meixner <johannes@meixner.dk>
To:        Dmitry Sivachenko <trtrmitya@gmail.com>, freebsd-emulation@freebsd.org
Subject:   Re: Unable to exec scripts from Linuxator
Message-ID:  <570E8FF6.3090401@meixner.dk>
In-Reply-To: <17FB69FC-A46A-4373-AF93-B9240C6742EA@gmail.com>
References:  <17FB69FC-A46A-4373-AF93-B9240C6742EA@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--tnAOfKg5WvKJidFiN2VMI0AALfL9MQ17h
Content-Type: multipart/mixed; boundary="nem10AUoeP72nNGN9OirXmsrm2VLSejkC"
From: Johannes Jost Meixner <johannes@meixner.dk>
To: Dmitry Sivachenko <trtrmitya@gmail.com>, freebsd-emulation@freebsd.org
Message-ID: <570E8FF6.3090401@meixner.dk>
Subject: Re: Unable to exec scripts from Linuxator
References: <17FB69FC-A46A-4373-AF93-B9240C6742EA@gmail.com>
In-Reply-To: <17FB69FC-A46A-4373-AF93-B9240C6742EA@gmail.com>

--nem10AUoeP72nNGN9OirXmsrm2VLSejkC
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: quoted-printable



On 04/ 5/16 11:24 AM, Dmitry Sivachenko wrote:
> Hello,
>=20
> I have a C program which uses system() to execute another program.  Pro=
gram is compiled under Linux and I run it on fresh FreeBSD-10 using Linux=
ator.
>=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

Can you try again, with the shell script in /compat/linux/tmp/ ?

Thanks,
Johannes

> $ ./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=
=2Eorg"
>=20


--nem10AUoeP72nNGN9OirXmsrm2VLSejkC--

--tnAOfKg5WvKJidFiN2VMI0AALfL9MQ17h
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJXDo/3AAoJEElqnXBiUNQC1lwQAKaKIKwg/k7I/5u4pI1mbJ40
UFWnPmC5yEuZi/nBdPy+qx0QWzmbxr7c564w7+ukbri0zgx8jfRZhBkYnHl/uG5P
9eYjZKrdn7OBsDMYQbB8NyJ4RBZudfy5Am4bSHAw8b8SQcnMCs1b5HzDiWTyb2oE
Ro+RRjq9BB98mXtxkNU0smz4du0rmn9kQRED9uK5gvMR8CBzHbaqjTh7d4mYGMgh
/qgSe1zoG49rActLzzFILVQni1QMSip0LAHFN7xu/1Kbgs3cUwSrTZV6ED8Eqy0m
+IBpm/xuO8bakuvl419Cbg5x+1L+Nd4w7GeENp/iwd5Umf56jOjEWt0O0xnA7nfV
rYUUYTpj8wvgSpr8MEHzvoUic5oxfOFNhFw55G/2tmnjUKaDVJt1Y3bbTYvFGC3w
Za1yTyO26UYC4TaFS8Lc7RkOvIFNS0ShrTsy7iX95H1chAf9eqh48GYCMyPu4CAz
gEn2hWZ9zuYY0ConwDbY/h0gChVl82vTzo2mJ5ik3UT4R/WaMxY5HCQfhgLSyaQl
NY5jntOyEK1IBe8OIzDabVSTW8YBLwW1rHI7zDcJQq/RirG39cyaqH3YBLUa6mOG
dHZFt1ZV73UGKSLTEUH+3SlziBNy+/viXX7QF8rch2ukiYFWBwFK6HYI+aymIJ5/
MT0D0mnAsE6tkJDUawZ6
=mPuP
-----END PGP SIGNATURE-----

--tnAOfKg5WvKJidFiN2VMI0AALfL9MQ17h--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?570E8FF6.3090401>