digitalmars.D.bugs - weird /proc reading bug in linux
- Andrew Luecke (9/9) Jun 24 2004 when reading /proc/sys/kernel/osrelease using:
- Ant (5/19) Jun 25 2004 proc files have 0 length
- Walter Bright (2/2) Feb 16 2009 Added to bugzill as
when reading /proc/sys/kernel/osrelease using: char[] thing = cast(char[])std.file.read("/proc/sys/kernel/osrelease") the string returned is completely empty.. its not a permission prob because cat has no probs, and either does C/C++.. And std.file.read works for other files it seems, just not ones in /proc (haven't tried to see if /dev reacts the same way). I'm guessing it might be because proc using procFS, not a standard filesystem Auzy http://driverondemand.sourceforge.net
Jun 24 2004
On Fri, 25 Jun 2004 06:42:34 +0000, Andrew Luecke wrote:when reading /proc/sys/kernel/osrelease using: char[] thing = cast(char[])std.file.read("/proc/sys/kernel/osrelease") the string returned is completely empty.. its not a permission prob because cat has no probs, and either does C/C++.. And std.file.read works for other files it seems, just not ones in /proc (haven't tried to see if /dev reacts the same way). I'm guessing it might be because proc using procFS, not a standard filesystem Auzy http://driverondemand.sourceforge.netproc files have 0 length std.file.read gets the length of the file and then gets that number of bytes - exactly 0 bytes. Ant
Jun 25 2004
Added to bugzill as http://d.puremagic.com/issues/show_bug.cgi?id=2670
Feb 16 2009