X-Recipient: archive-cygwin@delorie.com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 14C46385B512
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
	s=default; t=1693565978;
	bh=Ha4LicBFpxD11Lf0EEHR1aLTPm8KNjWAQZ2T8xbOUVc=;
	h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe:
	 List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:
	 From;
	b=tr8XKpVJ5V7lTzpCKrCjNrlrMVu2uiBpmkGIhruOE2IOvpiJA2zx72rN+Kg6obMJb
	 5kxNLP/UnRm41aMjWFHpwS3tKG6Dc1duVEE0mmrmqGLQJdB+tvzNc+Bkmup8zZAicI
	 sAST2wIsu2jGiyGJTuKslIZDS+LdfL1L10jdagG0=
X-Original-To: cygwin@cygwin.com
Delivered-To: cygwin@cygwin.com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B66FA3850400
Date: Fri, 1 Sep 2023 12:57:51 +0200
To: cygwin@cygwin.com
Subject: Re: Cygwin generates syscalls for *.lnk files on filesystems with
 native symlink support?
Message-ID: <ZPHDrz7VedOBROtT@calimero.vinschen.de>
Mail-Followup-To: cygwin@cygwin.com
References: <CALXu0UfRxk5G=3OjbwoNFW7xSj1rHTNw5giS6YZb9p1gF5ceTA@mail.gmail.com>
MIME-Version: 1.0
Content-Disposition: inline
In-Reply-To: <CALXu0UfRxk5G=3OjbwoNFW7xSj1rHTNw5giS6YZb9p1gF5ceTA@mail.gmail.com>
X-BeenThere: cygwin@cygwin.com
X-Mailman-Version: 2.1.30
Precedence: list
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-request@cygwin.com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=subscribe>
From: Corinna Vinschen via Cygwin <cygwin@cygwin.com>
Reply-To: cygwin@cygwin.com
Cc: Corinna Vinschen <corinna-cygwin@cygwin.com>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: cygwin-bounces+archive-cygwin=delorie.com@cygwin.com
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie.com@cygwin.com>

On Sep  1 06:23, Cedric Blancher via Cygwin wrote:
> Good morning!
> 
> During a Cygwin 3.4.8-1.x86_64 debugging session I noticed something
> odd when I looked at the network traffic generated by one of our
> cluster nodes:
> It seems that for each call to a tool (i.e. starting "sed" from
> "bash") Cygwin searches for *.lnk files.
> 
> Is this correct even when the filesystem in question has native
> symlink support (e.g. NFS)?

Yes.  During file handling, Cygwin doesn't know what filesystem a
file is on until it could actually open the file and request file
and filesystem info from the open handle.  So if Cygwin couldn't open
"foo" because the NtCreateFile call returned with status
STATUS_OBJECT_PATH_NOT_FOUND or STATUS_OBJECT_NAME_NOT_FOUND, or
STATUS_NO_SUCH_FILE, or one of the countless other status codes the
kernel (or the driver) might return in case a file doesn't exist,
it will tack on .lnk and .exe and, for historical reasons, .exe.lnk,
and try again.

Corinna

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