From ec45a027b19dc9ffc0c5f63f239979d860d05905 Mon Sep 17 00:00:00 2001 From: Pulux Date: Tue, 23 Mar 2021 18:55:58 +0100 Subject: [PATCH] incron: add patch to fix create zombie processes see: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=930526 --- .../patches/incron-0.5.12-prevent-zombies.patch | 11 +++++++++++ srcpkgs/incron/template | 3 ++- 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/incron/patches/incron-0.5.12-prevent-zombies.patch diff --git a/srcpkgs/incron/patches/incron-0.5.12-prevent-zombies.patch b/srcpkgs/incron/patches/incron-0.5.12-prevent-zombies.patch new file mode 100644 index 000000000000..63766c999509 --- /dev/null +++ b/srcpkgs/incron/patches/incron-0.5.12-prevent-zombies.patch @@ -0,0 +1,11 @@ +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); + diff --git a/srcpkgs/incron/template b/srcpkgs/incron/template index 19c08b4befaa..cd7e3f34eaed 100644 --- a/srcpkgs/incron/template +++ b/srcpkgs/incron/template @@ -1,13 +1,14 @@ # Template file for 'incron' pkgname=incron version=0.5.12 -revision=2 +revision=3 short_desc="Daemon that executes commands due to inotify events" maintainer="allan " license="X11" homepage="https://github.com/ar-/incron" distfiles="https://github.com/ar-/incron/archive/${version}.tar.gz" checksum=cce80bd723bafce59f35464f2f851d02707e32efa102e2b941ed0e42bdd38f91 +patch_args="-Np1" make_dirs="/var/spool/incron 0755 root root /etc/incron.d 0755 root root"