fd leak in error_logger_file_h?

Hal Snyder hal@REDACTED
Tue Dec 24 07:51:19 CET 2002


Is it just us, or is there a leak in stdlib/error_logger_file_h.erl?

The question arose when we noticed mysterious loss of space in /var on
a system where we use the above module inside a log file rotation
mechanism.

There's a call to file:open in init/2, but for terminate/2, there's
only

terminate(_Reason, _State) ->
    [].

shouldn't it be something like

terminate(_Reason, State) ->
    case State of
        {Fd, File, Prev} ->
            close(Fd);
        _ ->
            true
    end, 
    [].

?



More information about the erlang-questions mailing list