From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2155) id B66FA3850400; Fri, 1 Sep 2023 10:57:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B66FA3850400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1693565873; bh=1qdeFP1WvCl0XUZ8UVaOt1GLE9IG42OtW3S88KHuazw=; h=Date:From:To:Subject:Reply-To:References:In-Reply-To:From; b=tBmDIvvg0IgsuLAwoqPRpz+eh3fDZ+FTK+8eTGrCU8Zk7xhZqAxMZAvWo4O4y0Kzv Hke9IJPecvczbwstu81e/5knEiwJZEiXPjS9ZeUmISiWZgGVsmufNLIV45vxcPhfT6 ha58sn673ICpQli7yzLq4URKkF0dVgK/ewh6rtSQ= Received: by calimero.vinschen.de (Postfix, from userid 500) id DC9AEA803AE; Fri, 1 Sep 2023 12:57:51 +0200 (CEST) Date: Fri, 1 Sep 2023 12:57:51 +0200 From: Corinna Vinschen To: cygwin@cygwin.com Subject: Re: Cygwin generates syscalls for *.lnk files on filesystems with native symlink support? Message-ID: Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: List-Id: 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