os/process: add env to async calls too

This commit is contained in:
Vaxry 2025-06-23 20:25:15 +02:00
parent 38f3a21165
commit d46bd32da5
Signed by: vaxry
GPG key ID: 665806380871D640

View file

@ -206,6 +206,11 @@ bool Hyprutils::OS::CProcess::runAsync() {
argsC.emplace_back(nullptr);
// pass env
for (auto& [n, v] : m_impl->env) {
setenv(n.c_str(), v.c_str(), 1);
}
if (m_impl->stdoutFD != -1)
dup2(m_impl->stdoutFD, 1);
if (m_impl->stderrFD != -1)