fix execvp style

This commit is contained in:
B2krobbery 2026-04-25 09:06:11 +05:30
parent 29840057e9
commit 094ec219c2

View file

@ -77,13 +77,13 @@ bool Hyprutils::OS::CProcess::runSync() {
setenv(n.c_str(), v.c_str(), 1);
}
if (execvp(m_impl->binary.c_str(), argsC.data()) == -1) {
for (auto ptr : argsC) {
if (ptr)
free(ptr);
}
_exit(1);
execvp(m_impl->binary.c_str(), argsC.data());
for (auto ptr : argsC) {
if (ptr)
free(ptr);
}
_exit(1);
} else {
// parent
close(outPipe[1]);