delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/04/27/19:08:09

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Tue, 27 Apr 2010 19:07:55 -0400
From: Christopher Faylor <cgf-use-the-mailinglist-please AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: exec*() bug
Message-ID: <20100427230754.GA13912@ednor.casa.cgf.cx>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <4BD74C9E DOT 8040100 AT redhat DOT com>
MIME-Version: 1.0
In-Reply-To: <4BD74C9E.8040100@redhat.com>
User-Agent: Mutt/1.5.20 (2009-06-14)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On Tue, Apr 27, 2010 at 02:44:14PM -0600, Eric Blake wrote:
>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.

That's an easy one to fix.  The code was already trying to do the right
thing but it was confused by .exe handling.  I've checked in a fix
and am generating a snapshot now.

cgf

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019