aboutsummaryrefslogtreecommitdiffstats
path: root/lib/mnesia
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2016-10-17 12:16:09 +0200
committerDan Gudmundsson <[email protected]>2016-10-17 12:16:09 +0200
commitf8c047bb96eff53e5ddaff3d1a00d6a85a990bf3 (patch)
tree7d2fe94a27095fc4ebdd6f7bdb55593911cedf82 /lib/mnesia
parent82d1b7b4c79cef54f04e062f04b696544609a25b (diff)
downloadotp-f8c047bb96eff53e5ddaff3d1a00d6a85a990bf3.tar.gz
otp-f8c047bb96eff53e5ddaff3d1a00d6a85a990bf3.tar.bz2
otp-f8c047bb96eff53e5ddaff3d1a00d6a85a990bf3.zip
Avoid some error reports when stopping mnesia
Worker processes can cause error reports if the main mnesia processes dissapear.
Diffstat (limited to 'lib/mnesia')
-rw-r--r--lib/mnesia/src/mnesia_loader.erl9
-rw-r--r--lib/mnesia/src/mnesia_tm.erl2
2 files changed, 7 insertions, 4 deletions
diff --git a/lib/mnesia/src/mnesia_loader.erl b/lib/mnesia/src/mnesia_loader.erl
index d2e42ef0d1..c710470a2c 100644
--- a/lib/mnesia/src/mnesia_loader.erl
+++ b/lib/mnesia/src/mnesia_loader.erl
@@ -342,9 +342,12 @@ spawned_receiver(ReplyTo,Tab,Storage,Cs, SenderPid,TabSize,DetsData, Init) ->
Done = do_init_table(Tab,Storage,Cs,
SenderPid,TabSize,DetsData,
ReplyTo, Init),
- ReplyTo ! {self(),Done},
- unlink(ReplyTo),
- unlink(whereis(mnesia_controller)),
+ try
+ ReplyTo ! {self(),Done},
+ unlink(ReplyTo),
+ unlink(whereis(mnesia_controller))
+ catch _:_ -> ok %% avoid error reports when stopping down mnesia
+ end,
exit(normal).
wait_on_load_complete(Pid) ->
diff --git a/lib/mnesia/src/mnesia_tm.erl b/lib/mnesia/src/mnesia_tm.erl
index b116b48312..388b42cf15 100644
--- a/lib/mnesia/src/mnesia_tm.erl
+++ b/lib/mnesia/src/mnesia_tm.erl
@@ -950,7 +950,7 @@ return_abort(Fun, Args, Reason) ->
if
Level == 1 ->
mnesia_locker:async_release_tid(Nodes, Tid),
- ?MODULE ! {delete_transaction, Tid},
+ ?SAFE(?MODULE ! {delete_transaction, Tid}),
erase(mnesia_activity_state),
flush_downs(),
?SAFE(unlink(whereis(?MODULE))),