diff options
author | Justin Bedo <cu@cua0.org> | 2018-10-04 09:17:59 +1000 |
---|---|---|
committer | Justin Bedo <cu@cua0.org> | 2018-10-04 11:04:44 +1000 |
commit | 51f3817ecd2ad099b951d11e55eb3e2c516174d3 (patch) | |
tree | 0fcec3b63bc9acfb8f774556c5a847d5df0ec77d | |
parent | d210b314c8f878af7c543d93222bc7605abd5a5a (diff) |
add patch for nix to send SIGTERM instead of SIGKILL
-rw-r--r-- | nix.patch | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/nix.patch b/nix.patch new file mode 100644 index 0000000..ee98737 --- /dev/null +++ b/nix.patch @@ -0,0 +1,38 @@ +diff --git a/src/libstore/build.cc b/src/libstore/build.cc +index d75ca0be..b3de84e7 100644 +--- a/src/libstore/build.cc ++++ b/src/libstore/build.cc +@@ -1036,6 +1036,7 @@ void DerivationGoal::killChild() + it won't be killed, and we'll potentially lock up in + pid.wait(). So also send a conventional kill to the + child. */ ++ ::kill(-pid, SIGTERM); /* ignore the result */ + ::kill(-pid, SIGKILL); /* ignore the result */ + buildUser->kill(); + pid.wait(); +diff --git a/src/libutil/util.cc b/src/libutil/util.cc +index 6bc64ae7..7ff4de24 100644 +--- a/src/libutil/util.cc ++++ b/src/libutil/util.cc +@@ -779,7 +779,7 @@ void Pid::operator =(pid_t pid) + { + if (this->pid != -1 && this->pid != pid) kill(); + this->pid = pid; +- killSignal = SIGKILL; // reset signal to default ++ killSignal = SIGTERM; // reset signal to default + } + + +diff --git a/src/libutil/util.hh b/src/libutil/util.hh +index fc25d277..2e0d98f8 100644 +--- a/src/libutil/util.hh ++++ b/src/libutil/util.hh +@@ -218,7 +218,7 @@ class Pid + { + pid_t pid = -1; + bool separatePG = false; +- int killSignal = SIGKILL; ++ int killSignal = SIGTERM; + public: + Pid(); + Pid(pid_t pid); |