forked from lix-project/lix
Merge "libstore/ssh: only resume the logger when we paused it" into main
This commit is contained in:
commit
32ca194ebf
1 changed files with 2 additions and 1 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue