aboutsummaryrefslogtreecommitdiffstats
path: root/lib/mnesia/src/mnesia_monitor.erl
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2011-10-27 11:01:36 +0200
committerDan Gudmundsson <[email protected]>2011-11-07 14:19:34 +0100
commit567a8276de0b146bfcbf6e81626d11694ca8edf8 (patch)
tree73774f1038567949c3bfd77c5b7cc2e9f3f291e6 /lib/mnesia/src/mnesia_monitor.erl
parentf561a98a9b89738467b52ab5213562de753f6ad2 (diff)
downloadotp-567a8276de0b146bfcbf6e81626d11694ca8edf8.tar.gz
otp-567a8276de0b146bfcbf6e81626d11694ca8edf8.tar.bz2
otp-567a8276de0b146bfcbf6e81626d11694ca8edf8.zip
[mnesia] Cleanly bring down mnesia
Aviods failing/wobbling testcase. Mnesia mishandled supervisors.
Diffstat (limited to 'lib/mnesia/src/mnesia_monitor.erl')
-rw-r--r--lib/mnesia/src/mnesia_monitor.erl6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/mnesia/src/mnesia_monitor.erl b/lib/mnesia/src/mnesia_monitor.erl
index e110ad3241..8cb2e92c08 100644
--- a/lib/mnesia/src/mnesia_monitor.erl
+++ b/lib/mnesia/src/mnesia_monitor.erl
@@ -536,7 +536,11 @@ handle_info({'EXIT', Pid, R}, State) when Pid == State#state.supervisor ->
handle_info({'EXIT', Pid, fatal}, State) when node(Pid) == node() ->
dbg_out("~p got FATAL ERROR from: ~p~n",[?MODULE, Pid]),
- exit(State#state.supervisor, shutdown),
+ %% This may hang supervisor if a shutdown happens at the same time as an fatal
+ %% is in progress
+ %% exit(State#state.supervisor, shutdown),
+ %% It is better to kill an innocent process
+ catch exit(whereis(mnesia_locker), kill),
{noreply, State};
handle_info(Msg = {'EXIT',Pid,_}, State) ->