mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-22 15:05:59 +01:00
core: Fix typo and check grandchild PID in spawn() (#5070)
This commit is contained in:
parent
66330281ff
commit
0fc9d45e4b
1 changed files with 2 additions and 2 deletions
|
@ -792,9 +792,9 @@ uint64_t CKeybindManager::spawnRaw(std::string args) {
|
||||||
close(socket[1]);
|
close(socket[1]);
|
||||||
read(socket[0], &grandchild, sizeof(grandchild));
|
read(socket[0], &grandchild, sizeof(grandchild));
|
||||||
close(socket[0]);
|
close(socket[0]);
|
||||||
// clear child and leave child to init
|
// clear child and leave grandchild to init
|
||||||
waitpid(child, NULL, 0);
|
waitpid(child, NULL, 0);
|
||||||
if (child < 0) {
|
if (grandchild < 0) {
|
||||||
Debug::log(LOG, "Fail to create the second fork");
|
Debug::log(LOG, "Fail to create the second fork");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue