summaryrefslogtreecommitdiffstats
path: root/src/core/ephraim_config.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/ephraim_config.erl')
-rw-r--r--src/core/ephraim_config.erl3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/ephraim_config.erl b/src/core/ephraim_config.erl
index 6c556c2..dd9e64d 100644
--- a/src/core/ephraim_config.erl
+++ b/src/core/ephraim_config.erl
@@ -11,6 +11,8 @@ start_link() ->
-spec init(term()) -> {ok, dict()}.
init(_Args) ->
+ process_flag(trap_exit, true),
+
{ok, Terms} = file:consult(config_path() ++ "/ephraim.cfg"),
Config = dict:from_list(lists:map(fun(Term) -> {element(1, Term), Term} end, Terms)),
@@ -40,7 +42,6 @@ get(Key) ->
-spec handle_call(term(), {pid(), term()}, dict()) -> {reply, tuple() | error, dict()}.
handle_call({get, Key}, _From, Config) ->
- ephraim_config ! {self(), get, Key},
case dict:find(Key, Config) of
{ok, Value} ->
{reply, Value, Config};