aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLucas Reis <[email protected]>2024-03-11 15:31:39 -0400
committerGitHub <[email protected]>2024-03-11 19:31:39 +0000
commit0fc9d45e4be40cb148fcee2ae6a0574ae63f29aa (patch)
treecd4a9c20942a4cd0554299e2d7c02a2f82c951ea
parent66330281ff19e84c986c5ce639b670929e5dadd6 (diff)
downloadHyprland-0fc9d45e4be40cb148fcee2ae6a0574ae63f29aa.tar.gz
Hyprland-0fc9d45e4be40cb148fcee2ae6a0574ae63f29aa.zip
core: Fix typo and check grandchild PID in spawn() (#5070)
-rw-r--r--src/managers/KeybindManager.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp
index 6bcc7d3d..5178e848 100644
--- a/src/managers/KeybindManager.cpp
+++ b/src/managers/KeybindManager.cpp
@@ -792,9 +792,9 @@ uint64_t CKeybindManager::spawnRaw(std::string args) {
close(socket[1]);
read(socket[0], &grandchild, sizeof(grandchild));
close(socket[0]);
- // clear child and leave child to init
+ // clear child and leave grandchild to init
waitpid(child, NULL, 0);
- if (child < 0) {
+ if (grandchild < 0) {
Debug::log(LOG, "Fail to create the second fork");
return 0;
}