Make hook shutdown more reliable

This commit is contained in:
Eelco Dolstra 2014-08-19 17:44:59 +02:00 committed by Ludovic Courtès
parent ea837e470f
commit d4e7c195fa
1 changed files with 1 additions and 1 deletions

View File

@ -629,7 +629,6 @@ HookInstance::HookInstance()
});
pid.setSeparatePG(true);
pid.setKillSignal(SIGTERM);
fromHook.writeSide.close();
toHook.readSide.close();
}
@ -638,6 +637,7 @@ HookInstance::HookInstance()
HookInstance::~HookInstance()
{
try {
toHook.writeSide.close();
pid.kill(true);
} catch (...) {
ignoreException();