URI: 
       tadded double forking to avoid zombie children - wendy - watch files/directories and run commands on any event
  HTML git clone git://z3bra.org/wendy
   DIR Log
   DIR Files
   DIR Refs
   DIR README
   DIR LICENSE
       ---
   DIR commit 914fb4ad0fa9e4e14541ccd0baf749c582e6227a
   DIR parent d23d7988ed57234856fc6c8633582bf147a743e0
  HTML Author: z3bra <willy@mailoo.org>
       Date:   Mon, 15 Jun 2015 00:12:09 +0200
       
       added double forking to avoid zombie children
       
       Diffstat:
         M wendy.c                             |      11 +++++++++--
       
       1 file changed, 9 insertions(+), 2 deletions(-)
       ---
   DIR diff --git a/wendy.c b/wendy.c
       t@@ -21,6 +21,7 @@
        #include <linux/limits.h>
        #include <string.h>
        #include <sys/inotify.h>
       +#include <sys/wait.h>
        
        /* definitions, defaults, bla bla blah */
        #define EVENT_SIZE      (sizeof(struct inotify_event))
       t@@ -252,8 +253,14 @@ main (int argc, char **argv)
                                 * Me neither.  Just trust the if().
                                 */
                                if (cmd) {
       -                                /* OMG a new event ! Quick, raise an alert ! */
       -                                if (!fork()) { execvpe(cmd[0], cmd, environ); }
       +                                /*
       +                                 * OMG a new event! raise an alert!
       +                                 * Also, double-forking.
       +                                 */
       +                                if (!fork())
       +                                if (!fork()) execvpe(cmd[0], cmd, environ);
       +                                else exit(0);
       +                                else wait(NULL);
                                }
        
                                /* jump to the next one */