void-packages/srcpkgs/incron/patches/incron-0.5.12-prevent-zombies.patch

11 lines
517 B
Diff

diff -Nur incron-0.5.12.orig/icd-main.cpp incron-0.5.12/icd-main.cpp
--- incron-0.5.12.orig/icd-main.cpp 2019-01-05 11:43:19.722640603 -0800
+++ incron-0.5.12/icd-main.cpp 2019-01-05 11:45:41.236340779 -0800
@@ -105,6 +105,7 @@
g_fFinish = true;
break;
case SIGCHLD:
+ do {} while (waitpid((pid_t)-1, 0, WNOHANG) > 0); /* Prevent zombies */
// first empty pipe (to prevent internal buffer overflow)
do {} while (read(g_cldPipe[0], g_cldPipeBuf, CHILD_PIPE_BUF_LEN) > 0);