From 2e308238ad09e9527f9b8c3ec4a90b6b05a93367 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 1 Dec 2020 15:00:14 +0100 Subject: daemon: 'Agent' constructor takes a list of environment variables. * nix/libutil/util.hh (struct Agent)[Agent]: Add 'env' parameter. * nix/libutil/util.cc (Agent::Agent): Honor it. --- nix/libutil/util.hh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'nix/libutil/util.hh') diff --git a/nix/libutil/util.hh b/nix/libutil/util.hh index 13cff44316..880b0e93b2 100644 --- a/nix/libutil/util.hh +++ b/nix/libutil/util.hh @@ -7,6 +7,7 @@ #include #include #include +#include #include #include @@ -281,8 +282,10 @@ struct Agent /* The process ID of the agent. */ Pid pid; - /* The command and arguments passed to the agent. */ - Agent(const string &command, const Strings &args); + /* The command and arguments passed to the agent along with a list of + environment variable name/value pairs. */ + Agent(const string &command, const Strings &args, + const std::map &env = std::map()); ~Agent(); }; -- cgit v1.2.3