On Tue, Nov 22, 2005 at 11:17:45AM +0100, Jonathan Black wrote:
> On Mon, Nov 21, 2005 at 10:19:31PM -0700, Bob Proulx wrote:
> > 
> >   strace -e file cp -p /etc/debian_version /tmp
> >   strace -e file cp -p /etc/debian_version /net/beacon/tmp
> > 
> > On my system I see this:
> > 
> >   utimes("/net/marbles/tmp/debian_version", {1132636652, 0}) = 0
> 
> OK, thanks for the suggestion:
> 
> $ strace -e file cp -p /etc/debian_version /tmp 2>&1 | grep time
> utimes("/proc/self/fd/5", {1132653385, 0}) = 0
> 
> $ strace -e file cp -p /etc/debian_version /net/beacon/tmp 2>&1 | grep time
> utimes("/proc/self/fd/5", {1132653424, 0}) = 0
> 
> $ ls -l {/tmp,/net/beacon/tmp}/debian_version
> -rw-r--r-- 1 jonathan jonathan 17 2005-11-22 10:57 
> /net/beacon/tmp/debian_version
> -rw-r--r-- 1 jonathan jonathan 17 2005-06-06 19:50 /tmp/debian_version

> So it seems to definitely be a problem in the recent version of cp, and
> the striking difference to me is that it uses "/proc/self/fd/5" in the
> utimes call, where older versions (the ones on my other machines, and
> yours) use the literal path of the destination file. Should this matter?

Assuming that it's OK for cp to be calling utimes on these /proc/self
file descriptors rather than on the filename itself -- it seems to work
fine for the local destination file case after all -- could it be that
the fact that it mysteriously fails to work over nfs is actually a
kernel bug?

-- 
jonathaN


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to