diff options
author | Linus Nordberg <linus@sunet.se> | 2020-01-06 16:32:21 +0100 |
---|---|---|
committer | Linus Nordberg <linus@sunet.se> | 2020-01-06 16:32:21 +0100 |
commit | 2bb3ac3a7632e8f263ac0c7eebe23a5dcb2a6789 (patch) | |
tree | 4ff6235d4bce780164cfc180780474c700a18f4e /p11p-daemon/src/p11p_remote.erl | |
parent | 8061dfcdcbfbe9605ca73847b65bfef93add820c (diff) |
WIP set environment for remotes
Diffstat (limited to 'p11p-daemon/src/p11p_remote.erl')
-rw-r--r-- | p11p-daemon/src/p11p_remote.erl | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/p11p-daemon/src/p11p_remote.erl b/p11p-daemon/src/p11p_remote.erl index 1247f12..c6a1948 100644 --- a/p11p-daemon/src/p11p_remote.erl +++ b/p11p-daemon/src/p11p_remote.erl @@ -58,11 +58,16 @@ stop(Pid, Reason) -> gen_server:cast(Pid, {stop, Reason}). %% Genserver callbacks. -init([TokName, ModPath]) -> +init([TokName, ModPath, ModEnv]) -> RemoteBinPath = p11p_config:remotebin_path(), Port = open_port({spawn_executable, RemoteBinPath}, - [stream, exit_status, {args, [ModPath, "-v"]}]), + [stream, + exit_status, + {env, ModEnv}, + {args, [ModPath, "-v"]} % FIXME: Remove -v + ]), lager:debug("~p: ~s: new remote port: ~p", [self(), RemoteBinPath, Port]), + lager:debug("~p: ~s: module: ~s, env: ~p", [self(), RemoteBinPath, ModPath, ModEnv]), {ok, #state{port = Port, token = TokName}}. handle_call({add_to_outbuf, Data}, _From, State) -> |