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:
@@ -53,11 +53,6 @@ DerivationBuildingGoal::~DerivationBuildingGoal()
|
||||
{
|
||||
/* Careful: we should never ever throw an exception from a
|
||||
destructor. */
|
||||
try {
|
||||
killChild();
|
||||
} catch (...) {
|
||||
ignoreExceptionInDestructor();
|
||||
}
|
||||
#ifndef _WIN32 // TODO enable `DerivationBuilder` on Windows
|
||||
if (builder)
|
||||
builder.reset();
|
||||
|
||||
@@ -94,6 +94,11 @@ public:
|
||||
{
|
||||
/* Careful: we should never ever throw an exception from a
|
||||
destructor. */
|
||||
try {
|
||||
killChild();
|
||||
} catch (...) {
|
||||
ignoreExceptionInDestructor();
|
||||
}
|
||||
try {
|
||||
stopDaemon();
|
||||
} catch (...) {
|
||||
|
||||
Reference in New Issue
Block a user