diff options
author | alois31 <alois1@gmx-topmail.de> | 2024-08-02 16:59:44 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@localhost> | 2024-08-02 16:59:44 +0000 |
commit | 32ca194ebfa3610c8099e5713ee7d5cbb8fb125c (patch) | |
tree | 4e64f27884fc06b6e30724b9ed6a16371d4b6d9d | |
parent | e5177dddff13e7e5bb1bdecf28776822c6dba528 (diff) | |
parent | a93dade82118c68b3656ffb40d6a48ab66f2aa1a (diff) |
Merge "libstore/ssh: only resume the logger when we paused it" into main
-rw-r--r-- | src/libstore/ssh.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libstore/ssh.cc b/src/libstore/ssh.cc index 0d7bfa01d..8386b0e0a 100644 --- a/src/libstore/ssh.cc +++ b/src/libstore/ssh.cc @@ -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(); |