forked from lix-project/lix
Doh
This commit is contained in:
parent
dcdb254281
commit
ad790022fd
|
@ -1918,7 +1918,7 @@ void DerivationGoal::startBuilder()
|
||||||
options.allowVfork = !buildUser.enabled();
|
options.allowVfork = !buildUser.enabled();
|
||||||
pid = startProcess([&]() {
|
pid = startProcess([&]() {
|
||||||
runChild();
|
runChild();
|
||||||
});
|
}, options);
|
||||||
|
|
||||||
/* parent */
|
/* parent */
|
||||||
pid.setSeparatePG(true);
|
pid.setSeparatePG(true);
|
||||||
|
|
|
@ -850,7 +850,7 @@ void killUser(uid_t uid)
|
||||||
}
|
}
|
||||||
|
|
||||||
_exit(0);
|
_exit(0);
|
||||||
});
|
}, options);
|
||||||
|
|
||||||
int status = pid.wait(true);
|
int status = pid.wait(true);
|
||||||
if (status != 0)
|
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)
|
pid_t startProcess(std::function<void()> fun, const ProcessOptions & options)
|
||||||
{
|
{
|
||||||
auto wrapper = [&]() {
|
auto wrapper = [&]() {
|
||||||
_writeToStderr = 0;
|
if (!options.allowVfork) _writeToStderr = 0;
|
||||||
try {
|
try {
|
||||||
#if __linux__
|
#if __linux__
|
||||||
if (options.dieWithParent && prctl(PR_SET_PDEATHSIG, SIGKILL) == -1)
|
if (options.dieWithParent && prctl(PR_SET_PDEATHSIG, SIGKILL) == -1)
|
||||||
|
|
Loading…
Reference in a new issue