On 1/13/22 21:03, Paul Eggert wrote: > 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.
good idea, the *at functions are the more modern ones. > 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. yep, `make check-very-expensive` fails due to 3x segmentation faults: FAIL: tests/cp/cp-parents FAIL: tests/cp/parent-perm-race FAIL: tests/mv/hard-3 Furthermore, 'make syntax-check' complains about: prohibit_readlink src/copy.c:1266: if (0 <= readlinkat (dst_dirfd, dst_relname, dummy, sizeof dummy)) maint.mk: do not use readlink(at); use via xreadlink or areadlink* make: *** [cfg.mk:446: sc_prohibit_readlink] Error 1 Have a nice day, Berny
