[erlang-bugs] the error_logger does not clean up its file_io_server instances anymore (gen_event related?)

Dan Gudmundsson dangud@REDACTED
Thu Sep 17 09:50:15 CEST 2015


Thanks will fix asap.

On Wed, Sep 16, 2015 at 5:11 PM Nico Kruber <nico.kruber@REDACTED> wrote:

> In the current master (ddd1acec5100f5bcc96b29f09b80edd717746edf) the
> following
> code does not seem to properly remove the file_io_server processes. In
> error_logger_file_h [1] however, the terminate/2 function seems to clean
> up by
> closing the file.
>
> So I guess, either file:close/1 does not clean up or
> gen_event:delete_handler/3 (called by error_logger:logfile(close)[2]) does
> not
> call Module:terminate/2 anymore(?)
>
>
> error_logger:logfile({open, "test1"}).
> error_logger:logfile(close).
> error_logger:logfile({open, "test2"}).
> error_logger:logfile(close).
> [{X, file:pid2name(X)} || X <- processes(),
>   Data <- [process_info(X, [current_function, initial_call,
> registered_name])],
>   Data =/= undefined,
>   element(1, element(2, lists:keyfind(current_function, 1, Data))) =:=
> file_io_server].
>
>
> [1]
>
> https://github.com/erlang/otp/blob/ddd1acec5100f5bcc96b29f09b80edd717746edf/lib/stdlib/src/error_logger_file_h.erl#L97
> [2]
>
> https://github.com/erlang/otp/blob/ddd1acec5100f5bcc96b29f09b80edd717746edf/lib/kernel/src/error_logger.erl#L316
> _______________________________________________
> erlang-bugs mailing list
> erlang-bugs@REDACTED
> http://erlang.org/mailman/listinfo/erlang-bugs
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20150917/74b50f74/attachment.htm>


More information about the erlang-bugs mailing list