From 24b53fc84af301fff592e06723b980e29aa68289 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Fri, 10 May 2024 14:42:31 +0100 Subject: [PATCH] refactor, subprocess: Remove `Popen::pid()` --- src/util/subprocess.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/util/subprocess.h b/src/util/subprocess.h index af408b31d4d..09b386a37a8 100644 --- a/src/util/subprocess.h +++ b/src/util/subprocess.h @@ -902,7 +902,6 @@ private: * Command provided in a single string. * wait() - Wait for the child to exit. * retcode() - The return code of the exited child. - * pid() - PID of the spawned child. * poll() - Check the status of the running child. * send(...) - Send input to the input channel of the child. * communicate(...) - Get the output/error from the child and close the channels @@ -956,8 +955,6 @@ public: execute_process(); } - int pid() const noexcept { return child_pid_; } - int retcode() const noexcept { return retcode_; } int wait() noexcept(false); @@ -1068,7 +1065,7 @@ inline int Popen::wait() noexcept(false) return 0; #else int ret, status; - std::tie(ret, status) = util::wait_for_child_exit(pid()); + std::tie(ret, status) = util::wait_for_child_exit(child_pid_); if (ret == -1) { if (errno != ECHILD) throw OSError("waitpid failed", errno); return 0;