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;
|
ProcessOptions options;
|
||||||
options.dieWithParent = false;
|
options.dieWithParent = false;
|
||||||
|
|
||||||
|
std::optional<Finally<std::function<void()>>> resumeLoggerDefer;
|
||||||
if (!fakeSSH && !useMaster) {
|
if (!fakeSSH && !useMaster) {
|
||||||
logger->pause();
|
logger->pause();
|
||||||
|
resumeLoggerDefer.emplace([&]() { logger->resume(); });
|
||||||
}
|
}
|
||||||
Finally cleanup = [&]() { logger->resume(); };
|
|
||||||
|
|
||||||
conn->sshPid = startProcess([&]() {
|
conn->sshPid = startProcess([&]() {
|
||||||
restoreProcessContext();
|
restoreProcessContext();
|
||||||
|
|
Loading…
Reference in a new issue