diff --git a/lix/libutil/processes.cc b/lix/libutil/processes.cc index 78e574c24..2bec570bc 100644 --- a/lix/libutil/processes.cc +++ b/lix/libutil/processes.cc @@ -306,9 +306,9 @@ RunningProgram::~RunningProgram() } } -std::tuple> RunningProgram::release() +std::tuple> RunningProgram::release() { - return {pid.release(), std::move(childStdout)}; + return {std::move(pid), std::move(childStdout)}; } int RunningProgram::kill() diff --git a/lix/libutil/processes.hh b/lix/libutil/processes.hh index 97e9c25b9..7e05f607d 100644 --- a/lix/libutil/processes.hh +++ b/lix/libutil/processes.hh @@ -121,7 +121,7 @@ public: explicit operator bool() const { return bool(pid); } - std::tuple> release(); + std::tuple> release(); int kill(); [[nodiscard]] diff --git a/lix/nix/daemon.cc b/lix/nix/daemon.cc index e0a923f46..dc72bcd11 100644 --- a/lix/nix/daemon.cc +++ b/lix/nix/daemon.cc @@ -363,7 +363,8 @@ try { *forceTrustClientOpt ? "--force-trusted" : "--force-untrusted" ); } - runProgram2(options).release(); + auto [pid, _stdout] = runProgram2(options).release(); + pid.release(); } catch (Error & error) { auto ei = error.info(); // FIXME: add to trace?