Mail Archives: cygwin-developers/2002/07/05/13:25:21

Mailing-List: contact cygwin-developers-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-developers-subscribe AT cygwin DOT com>
List-Archive: <>
List-Post: <mailto:cygwin-developers AT cygwin DOT com>
List-Help: <mailto:cygwin-developers-help AT cygwin DOT com>, <>
Sender: cygwin-developers-owner AT cygwin DOT com
Delivered-To: mailing list cygwin-developers AT cygwin DOT com
Message-ID: <>
Date: Fri, 05 Jul 2002 13:23:09 -0400
From: Earnie Boyd <earnie_boyd AT yahoo DOT com>
X-Accept-Language: en
MIME-Version: 1.0
To: cygwin-developers AT cygwin DOT com
Subject: Re: stat vs open w/ ".exe"
References: <03e001c22427$ce581a00$6132bc3e AT BABEL> <20020705170333 DOT GD30783 AT redhat DOT com>

Christopher Faylor wrote:
> On Fri, Jul 05, 2002 at 02:28:09PM +0100, Conrad Scott wrote:
> >I think this has been discussed before but I've searched the
> >mailing lists to no avail, so here goes.
> >
> >If you *stat* a file with no suffix, e.g. /bin/bash, it will
> >succeed if there is a file /bin/bash.exe.
> >
> >If you *open* a file with no suffix, it doesn't succeed in that
> >case.
> >
> >(So "ls /bin/bash" succeeds and "strings /bin/bash" fails.)
> >
> >In other words, stat(2) also checks for the file with a .exe
> >extension, while open(2) doesn't.  The difference comes down to
> >the call to cygheap->fdtab.build_fhandler_from_name() in
> > vs that in
> >
> >Is this a bug or a deliberate decision? and if the latter, why so?
> It was a deliberate design decision.  It *has* been discussed many
> times both in this group and in cygwin AT cygwin.  I am not up to
> trying to recreate the argument (it wasn't mine) today.  Maybe
> someone else will.

All I'll do is say that the decisions were made in the '97/'98 time
frame so that Conrad knows how far back to go research.


- Raw text -

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