mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-03 21:51:55 -07:00
core: Fix typo and check grandchild PID in spawn() (#5070)
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user