| delorie.com/archives/browse.cgi | search |
| Mailing-List: | contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm |
| List-Subscribe: | <mailto:cygwin-developers-subscribe AT sourceware DOT cygnus DOT com> |
| List-Archive: | <http://sourceware.cygnus.com/ml/cygwin-developers/> |
| List-Post: | <mailto:cygwin-developers AT sourceware DOT cygnus DOT com> |
| List-Help: | <mailto:cygwin-developers-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs> |
| Sender: | cygwin-developers-owner AT sourceware DOT cygnus DOT com |
| Delivered-To: | mailing list cygwin-developers AT sourceware DOT cygnus DOT com |
| Message-ID: | <779F20BCCE5AD31186A50008C75D997917170E@SILLDN_MAIL1> |
| From: | "Fifer, Eric" <EFifer AT sanwaint DOT com> |
| To: | cygwin-developers AT sourceware DOT cygnus DOT com |
| Subject: | lstat() and implied .exe extension |
| Date: | Wed, 12 Apr 2000 19:24:24 +0100 |
| MIME-Version: | 1.0 |
| X-Mailer: | Internet Mail Service (5.5.2650.21) |
I have a question about a recent change to stat_worker():
Sat Mar 25 20:46:39 2000 Christopher Faylor <cgf AT cygnus DOT com>
* syscalls.cc (stat_worker): Use extension search mechanism in
path_conv to look for .exe rather than trying to special case it
here.
Before this change, an lstat() would more or less transparently add a
.exe extension to a symlink'ed file:
ln -s /bin/cat.exe
ls -l cat.exe
lrwxrwxrwx 1 fifere SIL_Equi 23 Apr 12 18:56 cat.exe ->
/bin/cat.exe
ls -l cat
-rwxrwxrwx 1 fifere SIL_Equi 23 Apr 12 18:56 cat
I say "more or less" because the non-exe version is considered a regular
file.
I assume in part this was done because ls ordinarily does a lstat() and if
the file is a symlink follows up with a readlink(), and readlink() will not
imply a .exe.
After the change, lstat() does not imply a .exe:
ls -l cat
ls: cat: No such file or directory
This isn't a big deal, but I was surprised by the change in behavior
and thought I should ask whether the impact was anticipated.
Thanks,
Eric Fifer
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |