summaryrefslogtreecommitdiff
path: root/nix/libutil/util.hh
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2020-09-14 16:17:19 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2020-09-14 16:17:19 -0400
commitfa8fe90edb4efaf7d52f71516c4dcabb13d56418 (patch)
tree8d69a1132e95845d8a3d90f1fe4d0ef04039e2f4 /nix/libutil/util.hh
parent1bec03df9b60f156c657a64a323ef27f4ed14b44 (diff)
parentd60739dff2e2f5eb74173b73a5fd207ef7cd110a (diff)
Merge remote-tracking branch 'origin/master' into core-updates
Diffstat (limited to 'nix/libutil/util.hh')
-rw-r--r--nix/libutil/util.hh25
1 files changed, 25 insertions, 0 deletions
diff --git a/nix/libutil/util.hh b/nix/libutil/util.hh
index 9e3c14bdd4..13cff44316 100644
--- a/nix/libutil/util.hh
+++ b/nix/libutil/util.hh
@@ -264,6 +264,29 @@ public:
void setKillSignal(int signal);
};
+/* An "agent" is a helper program that runs in the background and that we talk
+ to over pipes, such as the "guix offload" program. */
+struct Agent
+{
+ /* Pipes for talking to the agent. */
+ Pipe toAgent;
+
+ /* Pipe for the agent's standard output/error. */
+ Pipe fromAgent;
+
+ /* Pipe for build standard output/error--e.g., for build processes started
+ by "guix offload". */
+ Pipe builderOut;
+
+ /* The process ID of the agent. */
+ Pid pid;
+
+ /* The command and arguments passed to the agent. */
+ Agent(const string &command, const Strings &args);
+
+ ~Agent();
+};
+
/* Kill all processes running under the specified uid by sending them
a SIGKILL. */
@@ -295,6 +318,8 @@ void closeMostFDs(const set<int> & exceptions);
/* Set the close-on-exec flag for the given file descriptor. */
void closeOnExec(int fd);
+/* Common initialisation performed in child processes. */
+void commonChildInit(Pipe & logPipe);
/* User interruption. */