mirror of
https://github.com/hyprwm/hyprutils.git
synced 2026-05-07 08:58:01 +02:00
fix execvp style
This commit is contained in:
parent
29840057e9
commit
094ec219c2
1 changed files with 6 additions and 6 deletions
|
|
@ -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]);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue