file:position hangs when seeking off the end of a gzipped file

Bengt Kleberg <>
Thu May 18 10:28:37 CEST 2006


On 2006-05-17 19:43, Matthias Lang wrote:
> Hi,
> 
> This program hangs. I didn't expect it to.

...deleted
>     {ok, G} = file:open(filename(), [read, compressed]),
>     file:position(G, 123).

it might be worth mentioning that file:pread/3 also hangs during these 
circumstances (compressed file smaller than asked-for read position).
and that it does not help to use raw mode.


bengt



More information about the erlang-questions mailing list