aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2016-08-12 11:43:07 +0200
committerLukas Larsson <[email protected]>2016-08-12 11:43:07 +0200
commit2ad936f4e0b123aef8f2f89a97a383fce62cd4b3 (patch)
tree36e9571fc90edb8b15118ae56e1272d6cd66226d /lib
parent9cd8c5319a9ffd71fc5f8db755b4014f199fc0f2 (diff)
parent6c41e0910b2ccb12c7a431f4398a7d0213b5b02e (diff)
downloadotp-2ad936f4e0b123aef8f2f89a97a383fce62cd4b3.tar.gz
otp-2ad936f4e0b123aef8f2f89a97a383fce62cd4b3.tar.bz2
otp-2ad936f4e0b123aef8f2f89a97a383fce62cd4b3.zip
Merge branch 'maint'
Diffstat (limited to 'lib')
-rw-r--r--lib/kernel/src/code_server.erl6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/kernel/src/code_server.erl b/lib/kernel/src/code_server.erl
index 1792f9e908..48541ec500 100644
--- a/lib/kernel/src/code_server.erl
+++ b/lib/kernel/src/code_server.erl
@@ -135,10 +135,14 @@ split_paths([], _S, Path, Paths) ->
-spec call(term()) -> term().
call(Req) ->
+ Ref = erlang:monitor(process, ?MODULE),
?MODULE ! {code_call, self(), Req},
receive
{?MODULE, Reply} ->
- Reply
+ erlang:demonitor(Ref,[flush]),
+ Reply;
+ {'DOWN',Ref,process,_,_} ->
+ exit({'DOWN',code_server,Req})
end.
reply(Pid, Res) ->