diff options
author | Dan Gudmundsson <[email protected]> | 2011-10-27 11:01:36 +0200 |
---|---|---|
committer | Dan Gudmundsson <[email protected]> | 2011-11-07 14:19:34 +0100 |
commit | 567a8276de0b146bfcbf6e81626d11694ca8edf8 (patch) | |
tree | 73774f1038567949c3bfd77c5b7cc2e9f3f291e6 /lib/mnesia/src/mnesia_event.erl | |
parent | f561a98a9b89738467b52ab5213562de753f6ad2 (diff) | |
download | otp-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_event.erl')
-rw-r--r-- | lib/mnesia/src/mnesia_event.erl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/mnesia/src/mnesia_event.erl b/lib/mnesia/src/mnesia_event.erl index ec6b99ecaa..5a060a28ff 100644 --- a/lib/mnesia/src/mnesia_event.erl +++ b/lib/mnesia/src/mnesia_event.erl @@ -121,7 +121,7 @@ handle_system_event({mnesia_up, Node}, State) -> {ok, State#state{nodes = Nodes}}; handle_system_event({mnesia_down, Node}, State) -> - case mnesia:system_info(fallback_activated) of + case mnesia:system_info(fallback_activated) andalso Node =/= node() of true -> case mnesia_monitor:get_env(fallback_error_function) of {mnesia, lkill} -> @@ -129,8 +129,8 @@ handle_system_event({mnesia_down, Node}, State) -> "must be restarted. Forcing shutdown " "after mnesia_down from ~p...~n", report_fatal(Msg, [Node], nocore, State#state.dumped_core), - mnesia:lkill(), - exit(fatal); + catch exit(whereis(mnesia_monitor), fatal), + {ok, State}; {UserMod, UserFunc} -> Msg = "Warning: A fallback is installed and Mnesia got mnesia_down " "from ~p. ~n", |