diff --git a/src/libmain/shared.cc b/src/libmain/shared.cc index 326202d295fb0d5aee28d3e2fff8d85ce4be2931..a720afd6cdd4565127c91bd0e9c9ec58146eea2b 100644 --- a/src/libmain/shared.cc +++ b/src/libmain/shared.cc @@ -332,11 +332,7 @@ RunPager::~RunPager() pid.wait(); } } catch (...) { - try { - pid.kill(true); - } catch (...) { - ignoreException(); - } + ignoreException(); } } diff --git a/src/libstore/build.cc b/src/libstore/build.cc index 2b0f8e592d55adb1df5825cdb9bf994944098fe7..fc840df81a564c927a8ab72c4c8ed0482b12578c 100644 --- a/src/libstore/build.cc +++ b/src/libstore/build.cc @@ -642,7 +642,7 @@ HookInstance::~HookInstance() { try { toHook.writeSide = -1; - if (pid != -1) pid.kill(true); + if (pid != -1) pid.kill(); } catch (...) { ignoreException(); } @@ -1437,7 +1437,7 @@ void DerivationGoal::buildDone() to have terminated. In fact, the builder could also have simply have closed its end of the pipe, so just to be sure, kill it. */ - int status = hook ? hook->pid.kill(true) : pid.kill(true); + int status = hook ? hook->pid.kill() : pid.kill(); debug(format("builder process for ‘%1%’ finished") % drvPath); diff --git a/src/libutil/util.cc b/src/libutil/util.cc index d2d32782d02749315151808c82cb0ebca54642d0..99a91c8cc64a30d6dc850bc1b10a3367ebb83bbd 100644 --- a/src/libutil/util.cc +++ b/src/libutil/util.cc @@ -678,12 +678,11 @@ Pid::operator pid_t() } -int Pid::kill(bool quiet) +int Pid::kill() { assert(pid != -1); - if (!quiet) - printError(format("killing process %1%") % pid); + debug(format("killing process %1%") % pid); /* Send the requested signal to the child. If it has its own process group, send the signal to every process in the child diff --git a/src/libutil/util.hh b/src/libutil/util.hh index 4e3a011b349c292bfa7c456db204fc2a97a34d44..f94c0ff1c5ee02cbf70a8c8589b700099b1c4b70 100644 --- a/src/libutil/util.hh +++ b/src/libutil/util.hh @@ -203,7 +203,7 @@ public: ~Pid(); void operator =(pid_t pid); operator pid_t(); - int kill(bool quiet = false); + int kill(); int wait(); void setSeparatePG(bool separatePG);