[erlang-questions] bug in file:pread
Bengt Kleberg
bengt.kleberg@REDACTED
Fri Oct 6 15:22:24 CEST 2006
On 2006-10-06 14:36, Joe Armstrong wrote:
> pread(Handle, {eof,-N}, N) appears to be broken or have I misunderstood
> something?
>
> /Joe
>
> -module(bug1).
>
> -compile(export_all).
>
> bug() ->
> File = "test.bin",
> file:write_file(File, [<<"123456789">>]),
> {ok, FileHandle} = file:open(File, [binary,raw,read]),
i think the following extract from the manual is of importance:
''If IoDevice has been opened in raw mode, some restrictions apply:
Location is only allowed to be an integer;''
bengt
--
EPO guidelines 1978: "If the contribution to the known art resides
solely in a computer program then the subject matter is not
patentable in whatever manner it may be presented in the claims."
More information about the erlang-questions
mailing list