diff --git a/lib/kernel/src/prim_tty.erl b/lib/kernel/src/prim_tty.erl index 022276e8eec3..49dc5d306831 100644 --- a/lib/kernel/src/prim_tty.erl +++ b/lib/kernel/src/prim_tty.erl @@ -128,8 +128,6 @@ %% proc_lib exports -export([reader/1, writer/1]). --on_load(on_load/0). - %%-define(debug, true). -ifdef(debug). -define(dbg(Term), dbg(Term)). @@ -252,6 +250,8 @@ window_size(State = #state{ tty = TTY }) -> -spec init(options()) -> state(). init(UserOptions) when is_map(UserOptions) -> + on_load(), + Options = options(UserOptions), {ok, TTY} = tty_create(maps:get(ofd, Options)),