os/process: populate pid when ran sync

This commit is contained in:
Vaxry 2025-02-18 14:14:20 +00:00
parent e4e018a2ca
commit 77d7ea3498
2 changed files with 3 additions and 2 deletions

View file

@ -24,8 +24,7 @@ namespace Hyprutils {
const std::string& stdOut();
const std::string& stdErr();
// only populated when ran async
const pid_t pid();
const pid_t pid();
private:
std::string binary, out, err;

View file

@ -72,6 +72,8 @@ bool Hyprutils::OS::CProcess::runSync() {
out = "";
err = "";
grandchildPid = pid;
std::array<char, 1024> buf;
buf.fill(0);