mirror of
https://github.com/hyprwm/hypridle.git
synced 2024-12-22 13:39:47 +01:00
core: Fix typo and check correct grandchild PID in spawn() (#34)
This commit is contained in:
parent
029f08805a
commit
4395339a2d
1 changed files with 2 additions and 2 deletions
|
@ -249,9 +249,9 @@ static void spawn(const 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, "Failed to create the second fork");
|
Debug::log(LOG, "Failed to create the second fork");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue