bug-gnulib
[Top][All Lists]
Advanced

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

Re: [Bug-tar] [PATCH] two patches for --atime-preserve races and other p


From: Eric Blake
Subject: Re: [Bug-tar] [PATCH] two patches for --atime-preserve races and other problems
Date: Thu, 16 Sep 2010 16:55:16 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20100907 Fedora/3.1.3-1.fc13 Mnenhy/0.8.3 Thunderbird/3.1.3

On 09/16/2010 04:49 PM, Paul Eggert wrote:
[Adding bug-gnulib.]

On 09/16/10 11:17, Eric Blake wrote:

Why not just use the gnulib module fdutimensat instead of reimplementing
this yourself as fd_utimensat?

Mainly because fdutimensat does not let 'tar' pass AT_SYMLINK_NOFOLLOW to the
underlying system call.  Sometimes that flag is needed, sometimes not,
but fdutimensat hardwires a '0'.

Makes sense, and easy enough to fix. It's a gnulib API, so with proper notice in NEWS, we can add a parameter and adjust all callers.


If fdutimensat were modified to have an additional "atflag" argument, that
would overcome the main objection.

By the way, in a future version of tar I will also have a need for similar
functions fdchmodat, fdchownat, fdfstatat, but I don't know whether they're
worth gnulibifying.  (It's not entirely clear that fdutimensat is worth
gnulibifying either, to be honest.  :-)

Well, now that both coreutils and tar want to use it (modulo the changes to coreutils to accept the new parameter), it makes sense to me to keep it in gnulib. The other functions, like fdchmodat, may also make sense to move to gnulib once coreutils' copy.c file is rewritten to use fts and the *at functions rather than hand-recursing, but we can cross that bridge when we get there.

--
Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org



reply via email to

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