From c4bfce7ba2e5e601f8c76617297666a16f9c564f Mon Sep 17 00:00:00 2001 From: Ben Kibbey Date: Mon, 17 Dec 2007 18:24:48 -0500 Subject: [PATCH] Wait for the pinentry process to die in pth_waitpid(). Don't pass the WNOHANG flag. Fixes zombie processes. pth_waitpid() was sometimes getting called before the child process exited. --- src/pwmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pwmd.c b/src/pwmd.c index bcd75667..3228e6a9 100644 --- a/src/pwmd.c +++ b/src/pwmd.c @@ -459,7 +459,7 @@ static void *client_thread(void *data) log_write(N_("pth_read(): short byte count")); memset(&pk, 0, sizeof(pk)); - pth_waitpid(cl->pinentry->pid, &status, WNOHANG); + pth_waitpid(cl->pinentry->pid, &status, 0); close(cl->pinentry->fd); cl->pinentry->fd = -1; cl->pinentry->pid = 0; -- 2.11.4.GIT