Merge "libstore/ssh: only resume the logger when we paused it" into main

This commit is contained in:
alois31 2024-08-02 16:59:44 +00:00 committed by Gerrit Code Review
commit 32ca194ebf

View file

@ -65,10 +65,11 @@ std::unique_ptr<SSHMaster::Connection> SSHMaster::startCommand(const std::string
ProcessOptions options;
options.dieWithParent = false;
std::optional<Finally<std::function<void()>>> resumeLoggerDefer;
if (!fakeSSH && !useMaster) {
logger->pause();
resumeLoggerDefer.emplace([&]() { logger->resume(); });
}
Finally cleanup = [&]() { logger->resume(); };
conn->sshPid = startProcess([&]() {
restoreProcessContext();