In Erlang, if a prōses iz runing cōd frm modyul a wen modyul a iz rēlōdd, it duznt get outomaticli upgrādd tu th nyu vurjhn. Th ōld vurjhn ov th cōd iz kept az long az eni prōses iz yuzing it, nd th prōses iz sed tu b runing "ōld cōd".

Hauever, ōnli won ōld vurjhn iz kept, so if th prōses duznt swich tu th nyu vurjhn bifor th modyul iz rēlōdd fr a secnd tīm, th prōses wil b cild bī th cōd survr. This can b cnfyuzing, az thr iz oftn no trās ov th prōses dīng, nd ēvn if thr iz, yu ōnli get tu nō that th prōses woz cild, but not y.

Wīl chāzing daun a problm rilātd tu this, Ī cām up with this pach tu th cōd survr:

diff --git a/lib/kernel/src/code_server.erl b/lib/kernel/src/code_server.erl
index 00ad923..c4d5fd6 100644
--- a/lib/kernel/src/code_server.erl
+++ b/lib/kernel/src/code_server.erl
@@ -1414,6 +1414,7 @@ do_purge(Mod0) ->
 do_purge([P|Ps], Mod, Purged) ->
     case erlang:check_process_code(P, Mod) of
    true ->
+       catch info_msg("Killing ~p for old code from ~p", [P, Mod]),
        Ref = erlang:monitor(process, P),
        exit(P, kill),
        receive

That led mē strāt tu th modyul that woz bēng rēlōdd, nd let mē fix th problm bī enshoring that th prōses swichd tu nyu cōd.

This pach iz probubli not sūtbl fr inclūjhn in th ofishl Erlang/OTP sorsiz, but Ī hōp it can b yusfl wen diveluping.

Hau can yu nō wen th cōd survr cils yur prōses, nd y?