From cf930fa42e73b3ef96198c7b2914fdc8687d6feb Mon Sep 17 00:00:00 2001 From: o9000 Date: Mon, 8 Aug 2016 12:17:15 +0200 Subject: [PATCH] Fix hang (issue #586) --- src/tint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tint.c b/src/tint.c index 1cd1d5e..be3b48d 100644 --- a/src/tint.c +++ b/src/tint.c @@ -416,7 +416,7 @@ static void sigchld_handler_async() // Wait for all dead processes pid_t pid; int status; - while ((pid = waitpid(-1, &status, WNOHANG)) != -1) { + while ((pid = waitpid(-1, &status, WNOHANG)) != -1 && pid != 0) { #ifdef HAVE_SN SnLauncherContext *ctx = (SnLauncherContext *)g_tree_lookup(server.pids, GINT_TO_POINTER(pid)); if (ctx) {