coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

'cp' now uses openat etc. when copying to directories


From: Paul Eggert
Subject: 'cp' now uses openat etc. when copying to directories
Date: Thu, 13 Jan 2022 12:03:11 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.1

I installed the attached so that GNU 'cp' now uses directory-relative syscalls like 'openat', 'mkdirat' and 'chmodat' when the target is a directory. The idea is to make it easier to modify 'cp' in the future so that it can use xfts for recursive copies.

Even without xfts this should be a win, for uses of 'cp' to a directory, as it should be a bit faster and should avoid some race conditions. However, there are a lot of glitchy little things in this patch so I'm sending this heads-up as a warning that I may have introduced a bug.

You'll also need to run ./bootstrap after doing a git pull, since some of the Gnulib changes are needed for this.

Attachment: 0001-cp-when-copying-to-dir-use-dir-relative-names.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]