about summary refs log tree commit diff
path: root/src/libutil/util.hh
diff options
context:
space:
mode:
authorGraham Christensen <graham@grahamc.com>2019-05-11T20·35-0400
committerGraham Christensen <graham@grahamc.com>2019-05-12T17·17-0400
commitb4a05edbfe49f87555fd284dfb0d6c56ed43217d (patch)
tree447fd9d1be15f15f1cb0c8020b63b95acb74933b /src/libutil/util.hh
parentdde8eeb39ae9fb73011462c74e5fa6405e432147 (diff)
runProgram: support gid, uid, chdir
Diffstat (limited to 'src/libutil/util.hh')
-rw-r--r--src/libutil/util.hh5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libutil/util.hh b/src/libutil/util.hh
index 824a35b987e8..7c57d0afad98 100644
--- a/src/libutil/util.hh
+++ b/src/libutil/util.hh
@@ -265,10 +265,11 @@ string runProgram(Path program, bool searchPath = false,
     const Strings & args = Strings(),
     const std::optional<std::string> & input = {});
 
-pid_t doFork(bool allowVfork, std::function<void()> fun);
-
 struct RunOptions
 {
+    std::optional<uid_t> uid;
+    std::optional<uid_t> gid;
+    std::optional<Path> chdir;
     Path program;
     bool searchPath = true;
     Strings args;