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,7 +24,6 @@ namespace Hyprutils {
const std::string& stdOut(); const std::string& stdOut();
const std::string& stdErr(); const std::string& stdErr();
// only populated when ran async
const pid_t pid(); const pid_t pid();
private: private:

View file

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