[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: cp(1) fails to copy file from /proc
From: |
Mike Frysinger |
Subject: |
Re: cp(1) fails to copy file from /proc |
Date: |
Sun, 26 Apr 2009 23:33:21 -0400 |
User-agent: |
KMail/1.11.2 (Linux/2.6.29.1; KDE/4.2.2; x86_64; ; ) |
On Thursday 23 April 2009 15:35:20 Jim Meyering wrote:
> Jim Meyering wrote:
> > Mike Frysinger wrote:
> >> On Friday 17 April 2009 18:28:07 James Youngman wrote:
> >
> > ...
> >
> >>> The patch itself looks good, but it might be worth leaving in a
> >>> comment indicating why the optimisation should not be reintroduced...
> >>
> >> and/or a new test (i prefer the "and"):
> >> if [ -e /proc/cpuinfo ] ; then
> >> cp /proc/cpuinfo cpuinfo.cp
> >> cat /proc/cpuinfo > cpuinfo.cat
> >> cmp cpuinfo.cp cpuinfo.cat
> >> fi
> >
> > Of course ;-)
> > As promised, I've added a test for this below.
> >
> > We can't use /proc/cpuinfo, at least not precisely like that,
> > because its cpu speed line can change due to frequency scaling.
> > Also, that file is usually too small to trigger the failure.
> >
> > Here's a more complete patch, with a title and NEWS reflecting
> > that I now think it's a linux kernel bug.
> > I'll wait a few days before pushing, in case I learn otherwise.
>
> No one claims that /proc is POSIX compliant, so I'm pushing this.
wrt to stat(), sure, Linux rarely fills in the right size value. wrt to
read(), i'm pretty sure /proc behavior is POSIX compliant.
-mike
signature.asc
Description: This is a digitally signed message part.
- Re: cp(1) fails to copy file from /proc, (continued)
- Re: cp(1) fails to copy file from /proc, Jim Meyering, 2009/04/17
- Re: cp(1) fails to copy file from /proc, James Youngman, 2009/04/17
- Re: cp(1) fails to copy file from /proc, Mike Frysinger, 2009/04/18
- Re: cp(1) fails to copy file from /proc, Jim Meyering, 2009/04/18
- Re: cp(1) fails to copy file from /proc, Mike Frysinger, 2009/04/18
- Re: cp(1) fails to copy file from /proc, Jim Meyering, 2009/04/18
- Re: cp(1) fails to copy file from /proc, Andreas Schwab, 2009/04/19
- Re: cp(1) fails to copy file from /proc, Jim Meyering, 2009/04/19
- Re: cp(1) fails to copy file from /proc, James Youngman, 2009/04/19
- Re: cp(1) fails to copy file from /proc, Jim Meyering, 2009/04/23
- Re: cp(1) fails to copy file from /proc,
Mike Frysinger <=