From ce6cb14995e869cfea395570ccb300b0369c72dc Mon Sep 17 00:00:00 2001 From: eldritch horrors Date: Fri, 5 Apr 2024 21:15:22 +0200 Subject: libutil: return Pid from startProcess, not pid_t Change-Id: Icc8a15090c77f54ea7d9220aadedcd4a19922814 --- tests/functional/repl_characterization/test-session.cc | 4 ++-- tests/functional/repl_characterization/test-session.hh | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/functional/repl_characterization/test-session.cc b/tests/functional/repl_characterization/test-session.cc index e59064fc5..96f101cdd 100644 --- a/tests/functional/repl_characterization/test-session.cc +++ b/tests/functional/repl_characterization/test-session.cc @@ -22,7 +22,7 @@ RunningProcess RunningProcess::start(std::string executable, Strings args) procStdout.create(); // This is separate from runProgram2 because we have different IO requirements - pid_t pid = startProcess([&]() { + auto pid = startProcess([&]() { if (dup2(procStdout.writeSide.get(), STDOUT_FILENO) == -1) { throw SysError("dupping stdout"); } @@ -42,7 +42,7 @@ RunningProcess RunningProcess::start(std::string executable, Strings args) procStdin.readSide.close(); return RunningProcess{ - .pid = pid, + .pid = std::move(pid), .procStdin = std::move(procStdin), .procStdout = std::move(procStdout), }; diff --git a/tests/functional/repl_characterization/test-session.hh b/tests/functional/repl_characterization/test-session.hh index c77cce6d5..a9ba9cf0c 100644 --- a/tests/functional/repl_characterization/test-session.hh +++ b/tests/functional/repl_characterization/test-session.hh @@ -7,13 +7,14 @@ #include #include "file-descriptor.hh" +#include "processes.hh" #include "tests/terminal-code-eater.hh" namespace nix { struct RunningProcess { - pid_t pid; + Pid pid; Pipe procStdin; Pipe procStdout; -- cgit v1.2.3