From owner-freebsd-emulation@freebsd.org Wed Apr 13 18:29:16 2016 Return-Path: Delivered-To: freebsd-emulation@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 83046B0F511 for ; Wed, 13 Apr 2016 18:29:16 +0000 (UTC) (envelope-from johannes@meixner.or.at) Received: from dd16522.kasserver.com (dd16522.kasserver.com [85.13.137.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4649111DF for ; Wed, 13 Apr 2016 18:29:16 +0000 (UTC) (envelope-from johannes@meixner.or.at) Received: from mx12.chaot.net (179-252-190-90.dyn.estpak.ee [90.190.252.179]) by dd16522.kasserver.com (Postfix) with ESMTPSA id 942ED456109; Wed, 13 Apr 2016 20:29:13 +0200 (CEST) Received: from mx12.chaot.net (localhost [127.0.0.1]) by mx12.chaot.net (OpenSMTPD) with ESMTP id 9169f522; Wed, 13 Apr 2016 21:29:12 +0300 (EEST) Subject: Re: Unable to exec scripts from Linuxator To: Dmitry Sivachenko , freebsd-emulation@freebsd.org References: <17FB69FC-A46A-4373-AF93-B9240C6742EA@gmail.com> From: Johannes Jost Meixner Openpgp: id=C18F24928F1D36EA4FA0B2EF496A9D706250D402 Message-ID: <570E8FF6.3090401@meixner.dk> Date: Wed, 13 Apr 2016 21:29:10 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.7.1 MIME-Version: 1.0 In-Reply-To: <17FB69FC-A46A-4373-AF93-B9240C6742EA@gmail.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="tnAOfKg5WvKJidFiN2VMI0AALfL9MQ17h" X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Apr 2016 18:29:16 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --tnAOfKg5WvKJidFiN2VMI0AALfL9MQ17h Content-Type: multipart/mixed; boundary="nem10AUoeP72nNGN9OirXmsrm2VLSejkC" From: Johannes Jost Meixner To: Dmitry Sivachenko , 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 > #include >=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--