libstore: run childStarted as late as possible

otherwise we *technically* give away the output fds before we've read them.

Change-Id: I6ad0d6a1bb553ecfcdd7708f50d34142a425374d
This commit is contained in:
eldritch horrors 2024-08-13 03:26:18 +02:00
parent fb8eb539fc
commit e513cd2beb

View file

@ -726,7 +726,6 @@ void LocalDerivationGoal::startBuilder()
/* parent */
pid.setSeparatePG(true);
worker.childStarted(shared_from_this(), {builderOutPTY.get()}, true);
/* Check if setting up the build environment failed. */
std::vector<std::string> msgs;
@ -753,6 +752,8 @@ void LocalDerivationGoal::startBuilder()
debug("sandbox setup: " + msg);
msgs.push_back(std::move(msg));
}
worker.childStarted(shared_from_this(), {builderOutPTY.get()}, true);
}