file:read_file won't read from /proc

Martin DeMello martindemello@REDACTED
Thu Mar 4 15:14:05 CET 2010


Eshell V5.7.2  (abort with ^G)
1> {ok, F} = file:open("/proc/cpuinfo", [read]).
{ok,<0.37.0>}
2> file:read(F, 100).
{ok,"processor\t: 0\nvendor_id\t: GenuineIntel\ncpu family\t:
6\nmodel\t\t: 15\nmodel name\t: Intel(R) Core(TM)2 Du"}
3> file:close(F).
ok
4> {ok, B} = file:read_file("/proc/cpuinfo").
{ok,<<>>}

Why is B empty?

martin


More information about the erlang-questions mailing list