1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-16 00:00:07 +01:00

cgi add generic wait as antizombie defence

Signed-off-by: Andy Green <andy@warmcat.com>
This commit is contained in:
Andy Green 2016-05-04 12:23:27 +08:00
parent 4eab21976c
commit 8b02454634

View file

@ -2305,6 +2305,11 @@ lws_cgi_kill_terminated(struct lws_context_per_thread *pt)
}
#endif
/* general anti zombie defence */
n = waitpid(-1, &status, WNOHANG);
if (n > 0)
lwsl_notice("%s: anti-zombie wait says %d\n", __func__, n);
return 0;
}
#endif