aboutsummaryrefslogtreecommitdiff
path: root/src/libstore
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2012-12-19 11:47:42 +0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2012-12-19 11:47:42 +0100
commitfbf0b2fa45c883f1f5e0c8f5397fcf62a4df9207 (patch)
tree1acab97451989efcc91a531dc018d78f6686d545 /src/libstore
parent228ea7c2f988523d2c168f97975ab0e85f412e78 (diff)
Kill the build hook rather than shutting it down cleanly
Waiting for the hook to shut down cleanly sometimes seems to lead to hangs.
Diffstat (limited to 'src/libstore')
-rw-r--r--src/libstore/build.cc8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index ce87eaed2..08dfbd284 100644
--- a/src/libstore/build.cc
+++ b/src/libstore/build.cc
@@ -710,13 +710,7 @@ HookInstance::HookInstance()
HookInstance::~HookInstance()
{
try {
- /* Cleanly shut down the hook by closing its stdin if it's not
- already building. Otherwise pid's destructor will kill
- it. */
- if (pid != -1 && toHook.writeSide != -1) {
- toHook.writeSide.close();
- pid.wait(true);
- }
+ pid.kill();
} catch (...) {
ignoreException();
}