X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-6.9 required=5.0 	tests=BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
Message-ID: <4BD74C9E.8040100@redhat.com>
Date: Tue, 27 Apr 2010 14:44:14 -0600
From: Eric Blake <eblake@redhat.com>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100330 Fedora/3.0.4-1.fc12 Lightning/1.0b1 Thunderbird/3.0.4
MIME-Version: 1.0
To: cygwin <cygwin@cygwin.com>
Subject: exec*() bug
Content-Type: multipart/signed; micalg=pgp-sha256;  protocol="application/pgp-signature";  boundary="------------enig152E4D6B85D6FA421BDB3D30"
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

--------------enig152E4D6B85D6FA421BDB3D30
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On Linux, 'env ./.' triggers an exec() that fails with EACCES, and exits
with status 126 (file was located, but cannot be executed).  But on
Cygwin, the exec() fails with ENOENT, and env exits with status 127
(file could not be located).  This is particularly insidious, because
some programs depend on knowing the difference between the two types of
exec() errors (not present, vs. not executable).  For example, one test
of the findutils testsuite fails, because 'echo | xargs /' gives the
wrong status.

--=20
Eric Blake   eblake@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org


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

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iQEcBAEBCAAGBQJL10yeAAoJEKeha0olJ0Nq//UIAIoD0p7Bc04jrdhkqL6Jgfl/
lIqF4pIzZNuGy46R+JBxVIpBXKC+MsXUgZYEXklE3msZ1nd2HJNSSEft42SxsGnP
fzIiTkPaZiuMkA7aPtGAIMuWF0X9nMyfkZNJWlYVXk25t12hCGiU/oJrL2yLVdC6
kE/+N4oSx3ptDN4G0FATmGNpuks5KSg80fDo6PYbqns4NyTib8pOpFy8LitEo0+e
q1zn//Zs+1gR+287vaQkK4ecNph9tIduAVrvJEO8vxZnX8YdCVUJOYxDHd/gRtgw
rj2UbwRC1C1bSsAci5ES3GnSvWzfHMEr8VMj7m752Dzyi1zVddErfrH5/i/QDRA=
=3cgX
-----END PGP SIGNATURE-----

--------------enig152E4D6B85D6FA421BDB3D30--
