fix "waitpid for Xwayland fork failed: No child processes"

This commit is contained in:
ShakalnyKot 2025-02-28 12:46:47 +10:00
parent aa69ed81b5
commit b76df834f5
No known key found for this signature in database
GPG Key ID: 553752BDBBD6D88E

5
dwl.c
View File

@ -1554,10 +1554,15 @@ gpureset(struct wl_listener *listener, void *data)
void
handlesig(int signo)
{
#ifdef XWAYLAND
if (signo == SIGINT || signo == SIGTERM)
quit(NULL);
#else
if (signo == SIGCHLD)
while (waitpid(-1, NULL, WNOHANG) > 0);
else if (signo == SIGINT || signo == SIGTERM)
quit(NULL);
#endif
}
void