about summary refs log tree commit diff
path: root/src/libutil
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-12-12T12·41+0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-12-12T12·41+0100
commitad790022fddd5627eb237b95acae210c9b00c3de (patch)
tree3fbf19a4e42cad40664effec041143b6678b24cd /src/libutil
parentdcdb254281faf6466de2949a699f3718cfb90a3b (diff)
Doh
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 5895e7200e96..a91cf26aaa66 100644
--- a/src/libutil/util.cc
+++ b/src/libutil/util.cc
@@ -850,7 +850,7 @@ void killUser(uid_t uid)
         }
 
         _exit(0);
-    });
+    }, options);
 
     int status = pid.wait(true);
     if (status != 0)
@@ -885,7 +885,7 @@ static pid_t doFork(bool allowVfork, std::function<void()> fun)
 pid_t startProcess(std::function<void()> fun, const ProcessOptions & options)
 {
     auto wrapper = [&]() {
-        _writeToStderr = 0;
+        if (!options.allowVfork) _writeToStderr = 0;
         try {
 #if __linux__
             if (options.dieWithParent && prctl(PR_SET_PDEATHSIG, SIGKILL) == -1)