Skip to content

Commit

Permalink
erts: Fix init termination bug
Browse files Browse the repository at this point in the history
  • Loading branch information
garazdawi committed Jan 8, 2025
1 parent 412bff5 commit 0f7cb5a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
Binary file modified erts/preloaded/ebin/init.beam
Binary file not shown.
5 changes: 5 additions & 0 deletions erts/preloaded/src/init.erl
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,11 @@ boot_loop(BootPid, State) ->
notify(State#state.subscribed),
loop(State#state{status = {started,PS},
subscribed = []});
{'EXIT',BootPid,terminating} ->
%% If BootPid exited with terminating, then AC is about to
%% terminate and thus the entire system. We ignore this here
%% in order to give kernel a chance to flush logs to disk.
boot_loop(BootPid, State);
{'EXIT',BootPid,Reason} ->
% erlang:display({"init terminating in do_boot",Reason}),
crash("Runtime terminating during boot", [Reason]);
Expand Down
2 changes: 1 addition & 1 deletion lib/kernel/src/application_controller.erl
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ is_running(AppName) when is_atom(AppName) ->
%%-----------------------------------------------------------------
%% Func: start_boot_application/2
%% The same as start_application/2 expect that this function is
%% called from the boot script file. It mustnot be used by the operator.
%% called from the boot script file. It must not be used by the operator.
%% This function will cause a node crash if a permanent application
%% fails to boot start
%%-----------------------------------------------------------------
Expand Down

0 comments on commit 0f7cb5a

Please sign in to comment.