summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDiana Corbacho <diana@rabbitmq.com>2017-09-01 09:27:49 +0100
committerDiana Corbacho <diana@rabbitmq.com>2017-09-01 09:27:49 +0100
commitf1f8e8f6a1b2bc5342d4a77db2f10cf947cf8ab2 (patch)
treefc62842144ba706a0fd5ef8684436f80a5f79738 /src
parenta04658d53ecb375e43dd2e18c7b74fae9b3039fe (diff)
downloadrabbitmq-server-git-f1f8e8f6a1b2bc5342d4a77db2f10cf947cf8ab2.tar.gz
Effectively link the spawned process
rabbitmq-server#1346
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_node_monitor.erl12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/rabbit_node_monitor.erl b/src/rabbit_node_monitor.erl
index a8e21f1054..0c317869ac 100644
--- a/src/rabbit_node_monitor.erl
+++ b/src/rabbit_node_monitor.erl
@@ -690,12 +690,12 @@ await_cluster_recovery(Condition) ->
ok.
run_outside_applications(Fun, WaitForExistingProcess) ->
- spawn(fun () ->
- %% If our group leader is inside an application we are about
- %% to stop, application:stop/1 does not return.
- group_leader(whereis(init), self()),
- register_outside_app_process(Fun, WaitForExistingProcess)
- end).
+ spawn_link(fun () ->
+ %% If our group leader is inside an application we are about
+ %% to stop, application:stop/1 does not return.
+ group_leader(whereis(init), self()),
+ register_outside_app_process(Fun, WaitForExistingProcess)
+ end).
register_outside_app_process(Fun, WaitForExistingProcess) ->
%% Ensure only one such process at a time, the exit(badarg) is