about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-08-19T15·44+0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-08-19T15·47+0200
commit029424d17d0860e4423bbd409f22104f55ea65e0 (patch)
tree9652f92db4615ec58da1b42edd8d0706472bf9bd
parent02843ba4cb041992535c28b266796f75646544b5 (diff)
Make hook shutdown more reliable
-rw-r--r--src/libstore/build.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index 232059e70db0..aa539a1fa42b 100644
--- a/src/libstore/build.cc
+++ b/src/libstore/build.cc
@@ -617,7 +617,6 @@ HookInstance::HookInstance()
     });
 
     pid.setSeparatePG(true);
-    pid.setKillSignal(SIGTERM);
     fromHook.writeSide.close();
     toHook.readSide.close();
 }
@@ -626,6 +625,7 @@ HookInstance::HookInstance()
 HookInstance::~HookInstance()
 {
     try {
+        toHook.writeSide.close();
         pid.kill(true);
     } catch (...) {
         ignoreException();