diff options
author | Ludovic Courtès <ludo@gnu.org> | 2020-12-01 15:00:14 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2020-12-08 22:30:07 +0100 |
commit | 2e308238ad09e9527f9b8c3ec4a90b6b05a93367 (patch) | |
tree | 14c23360eb1e419919daa5e3b1a596f9450bd97c /nix/libutil/util.hh | |
parent | 4a9873529758f07869aede8057099a0f23144f8b (diff) |
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.
Diffstat (limited to 'nix/libutil/util.hh')
-rw-r--r-- | nix/libutil/util.hh | 7 |
1 files changed, 5 insertions, 2 deletions
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 <dirent.h> #include <unistd.h> #include <signal.h> +#include <map> #include <functional> #include <cstdio> @@ -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<string, string> &env = std::map<string, string>()); ~Agent(); }; |