Fix: kill zombies without breaking b963c2827fe5491e7073de4e829ac6686f148d8f
authorNikolas Garofil <garo@dunaldi.garofil.be>
Wed, 29 Jul 2009 09:43:16 +0000 (11:43 +0200)
committerNikolas Garofil <garo@dunaldi.garofil.be>
Wed, 29 Jul 2009 09:43:16 +0000 (11:43 +0200)
src/conky.c

index cd29ba7..4bc7ec0 100644 (file)
@@ -675,6 +675,7 @@ FILE* pid_popen(const char *command, const char *mode, pid_t *child) {
                return NULL;
        } else if(*child > 0) {
                close(childend);
+               waitpid(*child, NULL, WNOHANG);
        } else {
                //don't read from both stdin and pipe or write to both stdout and pipe
                if(childend == ends[0]) {