@@ -319,7 +319,7 @@ struct LocalDerivationGoal : DerivationGoal, RestrictionContext
319
319
*
320
320
* Called by destructor, can't be overridden
321
321
*/
322
- void killChild () override final ;
322
+ void killChild ();
323
323
324
324
/* *
325
325
* Kill any processes running under the build user UID or in the
@@ -442,8 +442,6 @@ void LocalDerivationGoal::killChild()
442
442
443
443
pid.wait ();
444
444
}
445
-
446
- DerivationGoal::killChild ();
447
445
}
448
446
449
447
@@ -814,7 +812,6 @@ static std::function<bool(Descriptor, std::string_view)> build_handler(
814
812
std::string & currentLogLine,
815
813
size_t & currentLogLinePos,
816
814
std::list<std::string> & logTail
817
-
818
815
) {
819
816
return [&](Descriptor fd, std::string_view data) {
820
817
// local & `ssh://`-builds are dealt with here.
@@ -1511,7 +1508,8 @@ Goal::Co LocalDerivationGoal::startBuilder(std::list<std::string> & logTail)
1511
1508
logTail
1512
1509
);
1513
1510
1514
- co_await childStarted ({builderOut.get ()}, true , true , std::move (handler));
1511
+ bool timedOut = false ;
1512
+ co_await childStarted ({builderOut.get ()}, true , true , std::move (handler), timedOut);
1515
1513
1516
1514
trace (" calling childStarted build end" );
1517
1515
@@ -1522,7 +1520,10 @@ Goal::Co LocalDerivationGoal::startBuilder(std::list<std::string> & logTail)
1522
1520
act->result (resBuildLogLine, currentLogLine);
1523
1521
}
1524
1522
1525
- if (failed) {
1523
+ if (timedOut) {
1524
+ killChild ();
1525
+ co_return done (BuildResult::TimedOut, {}, std::move (ex));
1526
+ } if (failed) {
1526
1527
killChild ();
1527
1528
co_return done (
1528
1529
BuildResult::LogLimitExceeded,
0 commit comments