diff --git a/src/core/Hypridle.cpp b/src/core/Hypridle.cpp index c38fcb5..1687b32 100644 --- a/src/core/Hypridle.cpp +++ b/src/core/Hypridle.cpp @@ -249,9 +249,9 @@ static void spawn(const 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, "Failed to create the second fork"); return; }