mirror of
https://github.com/NixOS/nix.git
synced 2025-11-15 15:02:42 +01:00
Move killChild call from ~DerivationBuildingGoal to ~DerivationBuilder
Sadly we cannot unexpose `DerivationBuilder::killChild` yet, because `DerivationBuildingGoal` calls it elsewhere, but we can at least haave a better division of labor between the two destructors.
This commit is contained in:
parent
c632c823ce
commit
bde745cb3f
2 changed files with 5 additions and 5 deletions
|
|
@ -53,11 +53,6 @@ DerivationBuildingGoal::~DerivationBuildingGoal()
|
||||||
{
|
{
|
||||||
/* Careful: we should never ever throw an exception from a
|
/* Careful: we should never ever throw an exception from a
|
||||||
destructor. */
|
destructor. */
|
||||||
try {
|
|
||||||
killChild();
|
|
||||||
} catch (...) {
|
|
||||||
ignoreExceptionInDestructor();
|
|
||||||
}
|
|
||||||
#ifndef _WIN32 // TODO enable `DerivationBuilder` on Windows
|
#ifndef _WIN32 // TODO enable `DerivationBuilder` on Windows
|
||||||
if (builder)
|
if (builder)
|
||||||
builder.reset();
|
builder.reset();
|
||||||
|
|
|
||||||
|
|
@ -94,6 +94,11 @@ public:
|
||||||
{
|
{
|
||||||
/* Careful: we should never ever throw an exception from a
|
/* Careful: we should never ever throw an exception from a
|
||||||
destructor. */
|
destructor. */
|
||||||
|
try {
|
||||||
|
killChild();
|
||||||
|
} catch (...) {
|
||||||
|
ignoreExceptionInDestructor();
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
stopDaemon();
|
stopDaemon();
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue