aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/src/kernel.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2016-01-27 14:52:15 +0100
committerBjörn Gustavsson <[email protected]>2016-01-27 16:33:24 +0100
commitb42d79a563993bacafcd3e4be24f324406e65c26 (patch)
tree2304f52d10fd9095751b4d683884d2d8d754f41b /lib/kernel/src/kernel.erl
parentdb61a493f72cc13f3e9b709b8e86da7e3d246f2b (diff)
downloadotp-b42d79a563993bacafcd3e4be24f324406e65c26.tar.gz
otp-b42d79a563993bacafcd3e4be24f324406e65c26.tar.bz2
otp-b42d79a563993bacafcd3e4be24f324406e65c26.zip
Simplify starting of code server
There is unnecessary knowledge about the -nostick option in the 'kernel' module. -nostick can be handled entirely in the 'code' module. There is no need to have both code:start_link/0 and code:start_link/1. code:start_link/0 is sufficient. Also get rid of error handling for things that cannot happen: The 'init' module has made sure that init:get_argument(root) can't fail, so there is no need for any error-reporting code. (See e1dc0aa4.) We also don't need to test the return value from code_server:start_link/1, because it will always return {ok,Pid} (or crash).
Diffstat (limited to 'lib/kernel/src/kernel.erl')
-rw-r--r--lib/kernel/src/kernel.erl8
1 files changed, 1 insertions, 7 deletions
diff --git a/lib/kernel/src/kernel.erl b/lib/kernel/src/kernel.erl
index 5f33f25a0d..40544da6c3 100644
--- a/lib/kernel/src/kernel.erl
+++ b/lib/kernel/src/kernel.erl
@@ -98,7 +98,7 @@ init([]) ->
{kernel_config, start_link, []},
permanent, 2000, worker, [kernel_config]},
Code = {code_server,
- {code, start_link, get_code_args()},
+ {code, start_link, []},
permanent, 2000, worker, [code]},
File = {file_server_2,
{file_server, start_link, []},
@@ -158,12 +158,6 @@ init(safe) ->
{ok, {SupFlags, Boot ++ DiskLog ++ Pg2}}.
-get_code_args() ->
- case init:get_argument(nostick) of
- {ok, [[]]} -> [[nostick]];
- _ -> []
- end.
-
start_dist_ac() ->
Spec = [{dist_ac,{dist_ac,start_link,[]},permanent,2000,worker,[dist_ac]}],
case application:get_env(kernel, start_dist_ac) of