From cafff554ed7c8b820a7758b10aa32fc699f341eb Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Thu, 3 May 2018 14:50:17 +0200 Subject: kernel: Remove doc for unused browser_cmd variable --- lib/kernel/doc/src/kernel_app.xml | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/lib/kernel/doc/src/kernel_app.xml b/lib/kernel/doc/src/kernel_app.xml index f96d946a5d..7894600c21 100644 --- a/lib/kernel/doc/src/kernel_app.xml +++ b/lib/kernel/doc/src/kernel_app.xml @@ -122,21 +122,6 @@ application. For more information about configuration parameters, see file app(4).

- browser_cmd = string() | {M,F,A} - -

When pressing the Help button in a tool such as Debugger, - the help text (an HTML file File) is by default - displayed in a Netscape browser, which is required to be - operational. This parameter can be used to change the command for - how to display the help text if another browser than Netscape - is preferred, or if another platform than Unix or Windows is - used.

-

If set to a string Command, the command - "Command File" is evaluated using - os:cmd/1.

-

If set to a module-function-args tuple, {M,F,A}, - the call apply(M,F,[File|A]) is evaluated.

-
distributed = [Distrib]

Specifies which applications that are distributed and on which -- cgit v1.2.3 From 6dcc96f4c8a14e05398a1ee8c4c5ccc7f2fbe778 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Thu, 3 May 2018 20:20:52 +0200 Subject: kernel: Refactor erl_signal_handler startup --- lib/kernel/src/erl_signal_handler.erl | 11 ++++++++++- lib/kernel/src/kernel.erl | 8 +------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/lib/kernel/src/erl_signal_handler.erl b/lib/kernel/src/erl_signal_handler.erl index 22f235d4e4..b76c2a217a 100644 --- a/lib/kernel/src/erl_signal_handler.erl +++ b/lib/kernel/src/erl_signal_handler.erl @@ -19,12 +19,21 @@ -module(erl_signal_handler). -behaviour(gen_event). --export([init/1, format_status/2, +-export([start/0, init/1, format_status/2, handle_event/2, handle_call/2, handle_info/2, terminate/2, code_change/3]). -record(state,{}). +start() -> + %% add signal handler + case whereis(erl_signal_server) of + %% in case of minimal mode + undefined -> ok; + _ -> + gen_event:add_handler(erl_signal_server, erl_signal_handler, []) + end. + init(_Args) -> {ok, #state{}}. diff --git a/lib/kernel/src/kernel.erl b/lib/kernel/src/kernel.erl index 20aa47f602..ae982c1741 100644 --- a/lib/kernel/src/kernel.erl +++ b/lib/kernel/src/kernel.erl @@ -32,13 +32,7 @@ start(_, []) -> case supervisor:start_link({local, kernel_sup}, kernel, []) of {ok, Pid} -> - %% add signal handler - case whereis(erl_signal_server) of - %% in case of minimal mode - undefined -> ok; - _ -> - ok = gen_event:add_handler(erl_signal_server, erl_signal_handler, []) - end, + ok = erl_signal_handler:start(), %% add error handler case logger:setup_standard_handler() of ok -> {ok, Pid, []}; -- cgit v1.2.3 From af60ccf4b2b176ff10a16b5285efbeaf4d16d3af Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Thu, 3 May 2018 20:21:59 +0200 Subject: kernel: Fix comment in kernel_config The error_logger is no longer added here. --- lib/kernel/src/kernel_config.erl | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/kernel/src/kernel_config.erl b/lib/kernel/src/kernel_config.erl index 535083ef27..c5ff1887c2 100644 --- a/lib/kernel/src/kernel_config.erl +++ b/lib/kernel/src/kernel_config.erl @@ -30,11 +30,8 @@ %%%----------------------------------------------------------------- %%% This module implements a process that configures the kernel %%% application. -%%% Its purpose is that in the init phase add an error_logger -%%% and when it dies (when the kernel application dies) deleting the -%%% previously installed error_logger. -%%% Also, this process waits for other nodes at startup, if -%%% specified. +%%% Its purpose is that in the init phase waits for other nodes at startup, +%%% if specified. %%%----------------------------------------------------------------- start_link() -> gen_server:start_link(kernel_config, [], []). -- cgit v1.2.3 From 09b16bc5e833af56c52e1fa9156f13eacf35f26b Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Tue, 15 May 2018 10:21:02 +0200 Subject: erts: Fix erts_os_times warning --- erts/emulator/sys/unix/erl_unix_sys.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erts/emulator/sys/unix/erl_unix_sys.h b/erts/emulator/sys/unix/erl_unix_sys.h index e367d565a7..10adf80875 100644 --- a/erts/emulator/sys/unix/erl_unix_sys.h +++ b/erts/emulator/sys/unix/erl_unix_sys.h @@ -264,7 +264,7 @@ erts_os_monotonic_time(void) ERTS_GLB_INLINE void erts_os_times(ErtsMonotonicTime *mtimep, ErtsSystemTime *stimep) { - return (*erts_sys_time_data__.r.o.os_times)(mtimep, stimep); + (*erts_sys_time_data__.r.o.os_times)(mtimep, stimep); } #endif /* ERTS_OS_TIMES_INLINE_FUNC_PTR_CALL__ */ -- cgit v1.2.3 From fa4fcc2bb54b6e60a9b9379707a5d30403b011ac Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Wed, 9 May 2018 19:43:43 +0200 Subject: erts: Fix unused variable warning in unix prim file --- erts/emulator/nifs/unix/unix_prim_file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erts/emulator/nifs/unix/unix_prim_file.c b/erts/emulator/nifs/unix/unix_prim_file.c index 1637f9cb71..2b112dda76 100644 --- a/erts/emulator/nifs/unix/unix_prim_file.c +++ b/erts/emulator/nifs/unix/unix_prim_file.c @@ -512,8 +512,8 @@ int efile_sync(efile_data_t *d, int data_only) { } int efile_advise(efile_data_t *d, Sint64 offset, Sint64 length, enum efile_advise_t advise) { - efile_unix_t *u = (efile_unix_t*)d; #ifdef HAVE_POSIX_FADVISE + efile_unix_t *u = (efile_unix_t*)d; int p_advise; switch(advise) { -- cgit v1.2.3