From: Margaret Wasserman Date: Mon, 15 Sep 2014 15:31:58 +0000 (-0400) Subject: Clean up any zombie processes whenever a new request is forked. X-Git-Tag: 1.4~8 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=trust_router.git;a=commitdiff_plain;h=576f38186b1f2d1f217539e9c076963956bd3de4 Clean up any zombie processes whenever a new request is forked. --- diff --git a/tid/tids.c b/tid/tids.c index 5dce161..d94fff2 100644 --- a/tid/tids.c +++ b/tid/tids.c @@ -387,9 +387,12 @@ int tids_start (TIDS_INSTANCE *tids, } else { close(conn); } + + /* clean up any processes that have completed */ + while (waitpid(-1, 0, WNOHANG) >= 0); } - return 1; /* should never get here */ + return 1; /* should never get here, loops "forever" */ } void tids_destroy (TIDS_INSTANCE *tids)