summaryrefslogtreecommitdiffstats
path: root/client.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2009-02-08 16:11:26 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2009-02-08 16:11:26 +0000
commit62d2ab3e687bfc7e0a02adedee30314b8ef1b08b (patch)
treefe5a18bde27c761f87eb287c6c5cd4b4e9c71440 /client.c
parent85fd2147af097184e596e5bbbb521bd1f3c0a0f1 (diff)
Continue process if suspended.
Diffstat (limited to 'client.c')
-rw-r--r--client.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/client.c b/client.c
index 811d7567..dc15bdfa 100644
--- a/client.c
+++ b/client.c
@@ -1,4 +1,4 @@
-/* $Id: client.c,v 1.42 2009-01-21 22:47:31 nicm Exp $ */
+/* $Id: client.c,v 1.43 2009-02-08 16:11:26 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -21,6 +21,7 @@
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/un.h>
+#include <sys/wait.h>
#include <errno.h>
#include <fcntl.h>
@@ -142,6 +143,10 @@ client_main(struct client_ctx *cctx)
error = NULL;
xtimeout = INFTIM;
while (!sigterm) {
+ if (sigchld) {
+ waitpid(WAIT_ANY, NULL, WNOHANG);
+ sigchld = 0;
+ }
if (sigwinch)
client_handle_winch(cctx);
if (sigcont) {