From 4be094ae021f3975261c1273c07ed8b8508d2706 Mon Sep 17 00:00:00 2001
From: Siri Hansen
Date: Thu, 10 Apr 2014 15:17:35 +0200
Subject: Add hyperlinks to modules in reference manual for kernel application
This makes the pointers to other reference manuals consistent
throughout this page.
---
lib/kernel/doc/src/kernel_app.xml | 43 ++++++++++++++++++++++++---------------
1 file changed, 27 insertions(+), 16 deletions(-)
diff --git a/lib/kernel/doc/src/kernel_app.xml b/lib/kernel/doc/src/kernel_app.xml
index 49a93d2c70..00c6bc33d6 100644
--- a/lib/kernel/doc/src/kernel_app.xml
+++ b/lib/kernel/doc/src/kernel_app.xml
@@ -4,7 +4,7 @@
- 19962013
+ 19962014
Ericsson AB. All Rights Reserved.
@@ -35,7 +35,7 @@
Erlang/OTP consists of Kernel and STDLIB. The Kernel application
contains the following services:
- - application controller, see application(3)
+ - application controller, see application(3)
- code
- disk_log
- dist_ac, distributed application controller
@@ -66,8 +66,8 @@
Configuration
The following configuration parameters are defined for the Kernel
- application. See app(3) for more information about
- configuration parameters.
+ application. See app(4) for more
+ information about configuration parameters.
browser_cmd = string() | {M,F,A}
-
@@ -93,7 +93,8 @@
- Time = integer()>0
- Nodes = [node() | {node(),...,node()}]
- The parameter is described in application(3), function
+
The parameter is described in
+ application(3), function
load/2.
dist_auto_connect = Value
@@ -105,11 +106,13 @@
never
- Connections are never automatically established, they
- must be explicitly connected. See net_kernel(3).
+ must be explicitly connected. See
+ net_kernel(3).
once
- Connections will be established automatically, but only
once per node. If a node goes down, it must thereafter be
- explicitly connected. See net_kernel(3).
+ explicitly connected. See
+ net_kernel(3).
permissions = [Perm]
@@ -121,7 +124,8 @@
- ApplName = atom()
- Bool = boolean()
- Permissions are described in application(3), function
+
Permissions are described in
+ application(3), function
permit/2.
error_logger = Value
@@ -149,7 +153,8 @@
global_groups = [GroupTuple]
-
-
Defines global groups, see global_group(3).
+ Defines global groups, see
+ global_group(3).
- GroupTuple = {GroupName, [Node]} | {GroupName, PublishType, [Node]}
- GroupName = atom()
@@ -160,18 +165,19 @@
inet_default_connect_options = [{Opt, Val}]
-
Specifies default options for connect sockets,
- see inet(3).
+ see inet(3).
inet_default_listen_options = [{Opt, Val}]
-
Specifies default options for listen (and
- accept) sockets, see inet(3).
+ accept) sockets, see inet(3).
{inet_dist_use_interface, ip_address()}
-
If the host of an Erlang node has several network interfaces,
this parameter specifies which one to listen on. See
- inet(3) for the type definition of ip_address().
+ inet(3) for the type definition
+ of ip_address().
{inet_dist_listen_min, First}
-
@@ -276,7 +282,8 @@ MaxT = TickTime + TickTime / 4
start_boot_server = true | false
-
Starts the boot_server if the parameter is true
- (see erl_boot_server(3)). This parameter should be
+ (see erl_boot_server(3)).
+ This parameter should be
set to true in an embedded system which uses this
service.
The default value is false.
@@ -296,13 +303,15 @@ MaxT = TickTime + TickTime / 4
start_disk_log = true | false
-
Starts the disk_log_server if the parameter is
- true (see disk_log(3)). This parameter should be
+ true (see disk_log(3)).
+ This parameter should be
set to true in an embedded system which uses this service.
The default value is false.
start_pg2 = true | false
-
-
Starts the pg2 server (see pg2(3)) if
+
Starts the pg2 server (see
+ pg2(3)) if
the parameter is true. This parameter should be set to
true in an embedded system which uses this service.
The default value is false.
@@ -310,7 +319,8 @@ MaxT = TickTime + TickTime / 4
start_timer = true | false
-
Starts the timer_server if the parameter is
- true (see timer(3)). This parameter should be
+ true (see timer(3)).
+ This parameter should be
set to true in an embedded system which uses this
service.
The default value is false.
@@ -351,6 +361,7 @@ MaxT = TickTime + TickTime / 4
pg2(3),
rpc(3),
seq_trace(3),
+ timer(3),
user(3)
--
cgit v1.2.3
From ef6a9b9b7f7a7c829f524d3f51448d3501c36652 Mon Sep 17 00:00:00 2001
From: Siri Hansen
Date: Fri, 11 Apr 2014 17:24:24 +0200
Subject: Store expanded config in
application_controller:change_application_data
If the Config given to application_controller:change_application_data
included other config files, it was only expanded for already existing
(loaded) applications. If an upgrade added a new application which had
config data in an included config file, the new application did not
get correct config data.
This is now changed so config data will be expanded for all
applications.
---
lib/kernel/src/application_controller.erl | 31 ++++++++++++------------
lib/kernel/test/application_SUITE.erl | 20 +++++++++++++--
lib/kernel/test/application_SUITE_data/t4.config | 1 +
3 files changed, 35 insertions(+), 17 deletions(-)
create mode 100644 lib/kernel/test/application_SUITE_data/t4.config
diff --git a/lib/kernel/src/application_controller.erl b/lib/kernel/src/application_controller.erl
index ed13035104..daad45b6c2 100644
--- a/lib/kernel/src/application_controller.erl
+++ b/lib/kernel/src/application_controller.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -829,12 +829,12 @@ handle_call({change_application_data, Applications, Config}, _From, S) ->
{reply, Error, S};
{'EXIT', R} ->
{reply, {error, R}, S};
- NewAppls ->
+ {NewAppls, NewConfig} ->
lists:foreach(fun(Appl) ->
ets:insert(ac_tab, {{loaded, Appl#appl.name},
Appl})
end, NewAppls),
- {reply, ok, S#state{conf_data = Config}}
+ {reply, ok, S#state{conf_data = NewConfig}}
end;
handle_call(prep_config_change, _From, S) ->
@@ -1550,18 +1550,19 @@ do_change_apps(Applications, Config, OldAppls) ->
end,
Errors),
- map(fun(Appl) ->
- AppName = Appl#appl.name,
- case is_loaded_app(AppName, Applications) of
- {true, Application} ->
- do_change_appl(make_appl(Application),
- Appl, SysConfig);
-
- %% ignored removed apps - handled elsewhere
- false ->
- Appl
- end
- end, OldAppls).
+ {map(fun(Appl) ->
+ AppName = Appl#appl.name,
+ case is_loaded_app(AppName, Applications) of
+ {true, Application} ->
+ do_change_appl(make_appl(Application),
+ Appl, SysConfig);
+
+ %% ignored removed apps - handled elsewhere
+ false ->
+ Appl
+ end
+ end, OldAppls),
+ SysConfig}.
is_loaded_app(AppName, [{application, AppName, App} | _]) ->
{true, {application, AppName, App}};
diff --git a/lib/kernel/test/application_SUITE.erl b/lib/kernel/test/application_SUITE.erl
index c6cbd1a0ef..036e238c85 100644
--- a/lib/kernel/test/application_SUITE.erl
+++ b/lib/kernel/test/application_SUITE.erl
@@ -1949,14 +1949,22 @@ config_change(Conf) when is_list(Conf) ->
%% Find out application data from boot script
Boot = filename:join([code:root_dir(), "bin", "start.boot"]),
{ok, Bin} = file:read_file(Boot),
- Appls = get_appls(binary_to_term(Bin)),
+ Appls0 = get_appls(binary_to_term(Bin)),
+
+ %% And add app1 in order to test OTP-11864 - included config files
+ %% not read for new (not already loaded) applications
+ Appls = [app1() | Appls0],
%% Simulate contents of "sys.config"
Config = [{stdlib, [{par1,sys},{par2,sys}]},
"t1",
"t2.config",
filename:join([DataDir, "subdir", "t3"]),
- {stdlib, [{par6,sys}]}],
+ {stdlib, [{par6,sys}]},
+ "t4.config"],
+
+ %% Check that app1 is not loaded
+ false = lists:keymember(app1,1,application:loaded_applications()),
%% Order application_controller to update configuration
ok = application_controller:change_application_data(Appls,
@@ -1971,6 +1979,13 @@ config_change(Conf) when is_list(Conf) ->
{value, {par5,t3}} = lists:keysearch(par5, 1, Env),
{value, {par6,sys}} = lists:keysearch(par6, 1, Env),
+ %% Check that app1 parameters are correctly set after loading
+ [] = application:get_all_env(app1),
+ application:load(app1()),
+ App1Env = application:get_all_env(app1),
+ {value, {par1,t4}} = lists:keysearch(par1, 1, App1Env),
+ application:unload(app1),
+
ok = file:set_cwd(CWD).
%% This function is stolen from SASL module release_handler, OTP R10B
@@ -1989,6 +2004,7 @@ get_appls([_ | T], Res) ->
get_appls([], Res) ->
Res.
+
persistent_env(suite) ->
[];
persistent_env(doc) ->
diff --git a/lib/kernel/test/application_SUITE_data/t4.config b/lib/kernel/test/application_SUITE_data/t4.config
new file mode 100644
index 0000000000..8b2bc52c01
--- /dev/null
+++ b/lib/kernel/test/application_SUITE_data/t4.config
@@ -0,0 +1 @@
+[{app1, [{par1,t4}]}].
\ No newline at end of file
--
cgit v1.2.3