From 029424d17d0860e4423bbd409f22104f55ea65e0 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 19 Aug 2014 17:44:59 +0200 Subject: [PATCH] Make hook shutdown more reliable --- src/libstore/build.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libstore/build.cc b/src/libstore/build.cc index 232059e70..aa539a1fa 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();