Re: the error_logger does not clean up its file_io_server instances anymore (gen_event related?)

Dan Gudmundsson <[email protected]> Thu, 17 Sep 2015 07:50:15 +0000
Newsgroups gmane.comp.lang.erlang.bugs
Message-ID <CANX4uuOpdjzgAt5Bwh14WvNOwZVKTApn7VHrSWKEga68NhzG4w@mail.gmail.com>
Thanks will fix asap.

On Wed, Sep 16, 2015 at 5:11 PM Nico Kruber <[email protected]> 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
> [email protected]
> http://erlang.org/mailman/listinfo/erlang-bugs
>

_______________________________________________
erlang-bugs mailing list
[email protected]
http://erlang.org/mailman/listinfo/erlang-bugs