aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/src
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2012-01-25 14:50:48 +0100
committerLukas Larsson <[email protected]>2012-01-25 14:50:48 +0100
commit92b5a1ad679dec79ae40cee4a144f6da614433e1 (patch)
tree848b3973460a3bbfd6acb12e8c3689e9a81562d4 /lib/kernel/src
parent1436244c50e214c3de656c52022881bc8a27ca37 (diff)
parent8b129dda86fe28b943180153561423bbb7957582 (diff)
downloadotp-92b5a1ad679dec79ae40cee4a144f6da614433e1.tar.gz
otp-92b5a1ad679dec79ae40cee4a144f6da614433e1.tar.bz2
otp-92b5a1ad679dec79ae40cee4a144f6da614433e1.zip
Merge branch 'maint'
* maint: Look for port in priv/bin/arch/ as well as priv/bin/ Fix on_load handling in modules loaded by code:load_binary/3
Diffstat (limited to 'lib/kernel/src')
-rw-r--r--lib/kernel/src/code_server.erl10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/kernel/src/code_server.erl b/lib/kernel/src/code_server.erl
index 32a12e2b52..5d4f2eb70c 100644
--- a/lib/kernel/src/code_server.erl
+++ b/lib/kernel/src/code_server.erl
@@ -1317,15 +1317,21 @@ int_list([H|T]) when is_integer(H) -> int_list(T);
int_list([_|_]) -> false;
int_list([]) -> true.
+load_file(Mod0, {From,_}=Caller, St0) ->
+ Mod = to_atom(Mod0),
+ case pending_on_load(Mod, From, St0) of
+ no -> load_file_1(Mod, Caller, St0);
+ {yes,St} -> {noreply,St}
+ end.
-load_file(Mod, Caller, #state{path=Path,cache=no_cache}=St) ->
+load_file_1(Mod, Caller, #state{path=Path,cache=no_cache}=St) ->
case mod_to_bin(Path, Mod) of
error ->
{reply,{error,nofile},St};
{Mod,Binary,File} ->
try_load_module(File, Mod, Binary, Caller, St)
end;
-load_file(Mod, Caller, #state{cache=Cache}=St0) ->
+load_file_1(Mod, Caller, #state{cache=Cache}=St0) ->
Key = {obj,Mod},
case ets:lookup(Cache, Key) of
[] ->