Unable to read from files in /proc

Unable to read from files in /proc

I can't seem to read from /proc files, using both 6.0 and 7.0 versions of the compiler and runtime.

Using the following code snippet:

if(ex) then
read(96,*) rreadseed

I get the following error:
Input/Output Error 153: Input file ended

In Procedure: fetchseed
At Line: 49

Statement: List-Directed READ
Unit: 96
Connected To: /proc/uptime
Form: Formatted
Access: Sequential
Records Read : 0
Records Written: 0

End of diagnostics

I've also tried several other files (including ones with multiple lines), but I always get the same problem - it barfs when trying to read the first line.

Anyone know what's up with reading /proc files, and what the trick to making it work is?


1 post / 0 new
For more complete information about compiler optimizations, see our Optimization Notice.