aboutsummaryrefslogtreecommitdiff
path: root/tests/functional
diff options
context:
space:
mode:
authoreldritch horrors <pennae@lix.systems>2024-04-05 21:15:22 +0200
committereldritch horrors <pennae@lix.systems>2024-06-23 11:52:49 +0000
commitce6cb14995e869cfea395570ccb300b0369c72dc (patch)
treeb1fff5058c8996bc7493eba48f1d5aae2b397670 /tests/functional
parent3d155fc509e19354ba3798b1cc1b9cbcdb789c85 (diff)
libutil: return Pid from startProcess, not pid_t
Change-Id: Icc8a15090c77f54ea7d9220aadedcd4a19922814
Diffstat (limited to 'tests/functional')
-rw-r--r--tests/functional/repl_characterization/test-session.cc4
-rw-r--r--tests/functional/repl_characterization/test-session.hh3
2 files changed, 4 insertions, 3 deletions
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 <string>
#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;