aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/processes.cc
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 /src/libutil/processes.cc
parent3d155fc509e19354ba3798b1cc1b9cbcdb789c85 (diff)
libutil: return Pid from startProcess, not pid_t
Change-Id: Icc8a15090c77f54ea7d9220aadedcd4a19922814
Diffstat (limited to 'src/libutil/processes.cc')
-rw-r--r--src/libutil/processes.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libutil/processes.cc b/src/libutil/processes.cc
index 9c99f047c..e8af12fbd 100644
--- a/src/libutil/processes.cc
+++ b/src/libutil/processes.cc
@@ -183,7 +183,7 @@ static int childEntry(void * arg)
#endif
-pid_t startProcess(std::function<void()> fun, const ProcessOptions & options)
+Pid startProcess(std::function<void()> fun, const ProcessOptions & options)
{
std::function<void()> wrapper = [&]() {
logger = makeSimpleLogger();
@@ -227,7 +227,7 @@ pid_t startProcess(std::function<void()> fun, const ProcessOptions & options)
if (pid == -1) throw SysError("unable to fork");
- return pid;
+ return Pid{pid};
}
std::string runProgram(Path program, bool searchPath, const Strings & args,