public inbox for cygwin-patches@cygwin.com
 help / color / mirror / Atom feed
From: Ken Brown <kbrown@cornell.edu>
To: cygwin-patches@cygwin.com
Subject: Re: [PATCH] Cygwin: fchmodat: add limited support for AT_SYMLINK_NOFOLLOW
Date: Wed, 27 Jan 2021 08:22:53 -0500	[thread overview]
Message-ID: <5b3fbee6-b80f-1a46-4574-059b9b0c951f@cornell.edu> (raw)
In-Reply-To: <20210127124054.GT4393@calimero.vinschen.de>

On 1/27/2021 7:40 AM, Corinna Vinschen via Cygwin-patches wrote:
> On Jan 26 16:30, Ken Brown via Cygwin-patches wrote:
>> Allow fchmodat with the AT_SYMLINK_NOFOLLOW flag to succeed on
>> non-symlinks.  Previously it always failed, as it does on Linux.  But
>> POSIX permits it to succeed on non-symlinks even if it fails on
>> symlinks.
>>
>> The reason for following POSIX rather than Linux is to make gnulib
>> report that fchmodat works on Cygwin.  This improves the efficiency of
>> packages like GNU tar that use gnulib's fchmodat module.  Previously
>> such packages would use a gnulib replacement for fchmodat on Cygwin.
> 
> Wait, what?  So if Cygwin behaves like Linux, gnulib treats fchmodat
> as non-working?  So what does gnulib do on a Linux system?  Does it
> use its own fchmodat there, too?

Apparently so.  Here's a comment from gnulib's test program for fchmodat:

               /* Test whether fchmodat+AT_SYMLINK_NOFOLLOW works on non-symlinks.
                  This test fails on GNU/Linux with glibc 2.31 (but not on
                  GNU/kFreeBSD nor GNU/Hurd) and Cygwin 2.9.  */

I agree that it's strange.

Ken

  reply	other threads:[~2021-01-27 13:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-26 21:30 Ken Brown
2021-01-27 12:16 ` Ken Brown
2021-01-27 12:40 ` Corinna Vinschen
2021-01-27 13:22   ` Ken Brown [this message]
2021-01-27 13:27     ` Corinna Vinschen
2021-01-27 17:26       ` Ken Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5b3fbee6-b80f-1a46-4574-059b9b0c951f@cornell.edu \
    --to=kbrown@cornell.edu \
    --cc=cygwin-patches@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).