[erlang-questions] file:read_file/2 bug?

Serge Aleynikov saleyn@REDACTED
Thu May 1 04:36:59 CEST 2008


For some reason file:read_file/1 always returns empty binary when 
reading from any file in the "/proc" filesystem.

1> file:read_file("/proc/self/environ").
{ok,<<>>}
2> {ok, FD} = file:open("/proc/self/environ", [read]).
{ok,<0.39.0>}
3> file:read(FD, 1024).
{ok,[82,
      69,
      77,
      ...
      121|...]}

Serge



More information about the erlang-questions mailing list