mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-30 01:26:15 +02:00
Make hook shutdown more reliable
This commit is contained in:
parent
02843ba4cb
commit
029424d17d
1 changed files with 1 additions and 1 deletions
|
@ -617,7 +617,6 @@ HookInstance::HookInstance()
|
||||||
});
|
});
|
||||||
|
|
||||||
pid.setSeparatePG(true);
|
pid.setSeparatePG(true);
|
||||||
pid.setKillSignal(SIGTERM);
|
|
||||||
fromHook.writeSide.close();
|
fromHook.writeSide.close();
|
||||||
toHook.readSide.close();
|
toHook.readSide.close();
|
||||||
}
|
}
|
||||||
|
@ -626,6 +625,7 @@ HookInstance::HookInstance()
|
||||||
HookInstance::~HookInstance()
|
HookInstance::~HookInstance()
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
|
toHook.writeSide.close();
|
||||||
pid.kill(true);
|
pid.kill(true);
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
ignoreException();
|
ignoreException();
|
||||||
|
|
Loading…
Reference in a new issue