bug-coreutils
[Top][All Lists]
Advanced

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

Re: cp(1) fails to copy file from /proc


From: James Youngman
Subject: Re: cp(1) fails to copy file from /proc
Date: Fri, 17 Apr 2009 10:25:09 +0100

On Thu, Apr 16, 2009 at 1:54 PM, Jim Meyering <address@hidden> wrote:
> Thank you for the bug report.
> The relevant code from coreutils/src/copy.c is here:
>
>            /* A short read on a regular file means EOF.  */
>            if (n_read != buf_size && S_ISREG (src_open_sb.st_mode))
>              break;
>
> That optimization was added over three years ago, with this change:
>
>    http://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=25719a33154f0c6
>
> It appears that it is not (no longer?) valid for most mainstream kernels,
> at least for files on /proc, so I'll remove it or adjust it.

Really?    This seems more like a kernel bug to me.    Specifically, I
was under the firm impression that a short read from a file _does_
mean that you've reached the end-of-file.

James.




reply via email to

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