about summary refs log tree commit diff
path: root/src/libutil
diff options
context:
space:
mode:
authorGraham Christensen <graham@grahamc.com>2019-05-12T21·03-0400
committerGraham Christensen <graham@grahamc.com>2019-05-12T21·03-0400
commitf1b8e9efe77014655f059b44afa05c38990dc4aa (patch)
tree04ca4041709d36e9805bb561489eed9d91fcbe85 /src/libutil
parent73b797c207e1c7a0fd9059d2cf1e3479502f8f1b (diff)
runProgram: Uncomment chdir support
Diffstat (limited to 'src/libutil')
-rw-r--r--src/libutil/util.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libutil/util.cc b/src/libutil/util.cc
index 55b9144f314e..17aee2d5c3d0 100644
--- a/src/libutil/util.cc
+++ b/src/libutil/util.cc
@@ -1026,8 +1026,8 @@ void runProgram2(const RunOptions & options)
         if (source && dup2(in.readSide.get(), STDIN_FILENO) == -1)
             throw SysError("dupping stdin");
 
-        //if (options.chdir && chdir((*options.chdir).c_str()) == -1)
-        //    throw SysError("chdir failed");
+        if (options.chdir && chdir((*options.chdir).c_str()) == -1)
+            throw SysError("chdir failed");
         if (options.gid && setgid(*options.gid) == -1)
             throw SysError("setgid failed");
         /* Drop all other groups if we're setgid. */