Skip to content

Commit f1f8e8f

Browse files
committed
Effectively link the spawned process
rabbitmq-server#1346
1 parent a04658d commit f1f8e8f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/rabbit_node_monitor.erl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -690,12 +690,12 @@ await_cluster_recovery(Condition) ->
690690
ok.
691691

692692
run_outside_applications(Fun, WaitForExistingProcess) ->
693-
spawn(fun () ->
694-
%% If our group leader is inside an application we are about
695-
%% to stop, application:stop/1 does not return.
696-
group_leader(whereis(init), self()),
697-
register_outside_app_process(Fun, WaitForExistingProcess)
698-
end).
693+
spawn_link(fun () ->
694+
%% If our group leader is inside an application we are about
695+
%% to stop, application:stop/1 does not return.
696+
group_leader(whereis(init), self()),
697+
register_outside_app_process(Fun, WaitForExistingProcess)
698+
end).
699699

700700
register_outside_app_process(Fun, WaitForExistingProcess) ->
701701
%% Ensure only one such process at a time, the exit(badarg) is

0 commit comments

Comments
 (0)