diff options
author | Sverker Eriksson <[email protected]> | 2015-12-16 20:03:32 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2016-01-13 19:59:54 +0100 |
commit | 79efde2d8503e5055ef9e8afa5d8d63208710b1f (patch) | |
tree | 77342e16ab227d8b9a175f4573305f244d17cceb /erts/preloaded | |
parent | dc54c2a27c41930a18e0c7f2b97eda6cd4a0b1c1 (diff) | |
download | otp-79efde2d8503e5055ef9e8afa5d8d63208710b1f.tar.gz otp-79efde2d8503e5055ef9e8afa5d8d63208710b1f.tar.bz2 otp-79efde2d8503e5055ef9e8afa5d8d63208710b1f.zip |
erts: Make copy_literals more fail safe
* Same process must do enable-disable.
* System process will force it and never get 'aborted'
Diffstat (limited to 'erts/preloaded')
-rw-r--r-- | erts/preloaded/ebin/erts_code_purger.beam | bin | 8996 -> 8832 bytes | |||
-rw-r--r-- | erts/preloaded/src/erts_code_purger.erl | 12 |
2 files changed, 5 insertions, 7 deletions
diff --git a/erts/preloaded/ebin/erts_code_purger.beam b/erts/preloaded/ebin/erts_code_purger.beam Binary files differindex 74001fc799..c5aec6bb25 100644 --- a/erts/preloaded/ebin/erts_code_purger.beam +++ b/erts/preloaded/ebin/erts_code_purger.beam diff --git a/erts/preloaded/src/erts_code_purger.erl b/erts/preloaded/src/erts_code_purger.erl index c7fe3ce22f..791ef72f13 100644 --- a/erts/preloaded/src/erts_code_purger.erl +++ b/erts/preloaded/src/erts_code_purger.erl @@ -63,11 +63,10 @@ purge(Mod) when is_atom(Mod) -> do_purge(Mod) -> - case erlang:check_old_code(Mod) of + case erts_internal:copy_literals(Mod, true) of false -> {false, false}; true -> - true = erts_internal:copy_literals(Mod, true), DidKill = check_proc_code(erlang:processes(), Mod, true), true = erts_internal:copy_literals(Mod, false), WasPurged = erts_internal:purge_module(Mod), @@ -89,17 +88,16 @@ soft_purge(Mod) -> do_soft_purge(Mod) -> - case erlang:check_old_code(Mod) of + case erts_internal:copy_literals(Mod, true) of false -> true; true -> - true = erts_internal:copy_literals(Mod, true), - case check_proc_code(erlang:processes(), Mod, false) of + DoPurge = check_proc_code(erlang:processes(), Mod, false), + true = erts_internal:copy_literals(Mod, false), + case DoPurge of false -> - true = erts_internal:copy_literals(Mod, false), false; true -> - true = erts_internal:copy_literals(Mod, false), erts_internal:purge_module(Mod), true end |