Subject: Re: [Boost-bugs] [Boost C++ Libraries] #4824: Boost file system function file_size() function is returning 0 for /proc virtual file system files.
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-12-03 21:00:22
#4824: Boost file system function file_size() function is returning 0 for /proc
virtual file system files.
----------------------------------+-----------------------------------------
Reporter: pmanth2@⦠| Owner: bemandawes
Type: Bugs | Status: closed
Milestone: To Be Determined | Component: filesystem
Version: Boost 1.44.0 | Severity: Problem
Resolution: worksforme | Keywords:
----------------------------------+-----------------------------------------
Changes (by bemandawes):
* status: new => closed
* resolution: => worksforme
Comment:
On my Linux VirtualBox:
$ ls -l /proc/cpuinfo
-r--r--r-- 1 root root 0 2010-12-03 15:43 /proc/cpuinfo
so I'm closing this issue as "Works for me".
I think you may be confusing the results returned by various usages of the
command line interpreter you are using with the results being reported by
your operating system's API (which is POSIX-based, in the case of Linux).
The Boost filesystem library is just reporting whatever the operating
system's API tells it. In the case of file size, the ls -l file size is a
pretty good surrogate. The results of wc are a very poor surrogate.
"When normal files are considered both "ls -ltr " and wc give the same
result."
Check you tests again - the two commands give very different results, as
expected.
HTH,
--Beman
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/4824#comment:4> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:04 UTC