Re: [Boost-bugs] [Boost C++ Libraries] #4824: Boost file system function file_size() function is returning 0 for /proc virtual file system files.

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-11-10 17:49:33


#4824: Boost file system function file_size() function is returning 0 for /proc
virtual file system files.
----------------------------------+-----------------------------------------
  Reporter: pmanth2@… | Owner: bemandawes
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: filesystem
   Version: Boost 1.44.0 | Severity: Problem
Resolution: | Keywords:
----------------------------------+-----------------------------------------

Comment (by anonymous):

 Replying to [comment:2 jewillco]:
> Are you sure that these are not just the values returned by the kernel?
 `ls -l` on `/proc/cpuinfo` returns a size of 0 as well. I do not know
 about the `tellg` behavior, but it could be from a similar issue.


 Hi!

 Thanks for the quick response.

 "ls -ltr /proc/cpuinfo" is retruning 0 whereas "wc /proc/cpuinfo"
 retruning size 10102

 pmanth2_at_cyder:~/new-saga-code/trunk/adaptors/default/file$ ls -ltr
 /proc/cpuinfo
 -r--r--r-- 1 root root 0 2010-11-10 10:40 /proc/cpuinfo

 pmanth2_at_cyder:~/new-saga-code/trunk/adaptors/default/file$ wc
 /proc/cpuinfo
 312 1872 10102 /proc/cpuinfo

 pmanth2_at_cyder:~/new-saga-code/trunk/adaptors/default/file$

 I guess file_size should return 10102 in this case.. I think this is
 special case for proc files.

 When normal files are considered both "ls -ltr " and wc give the same
 result.

 thanks
 pradeep

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/4824#comment:3>
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