diff --git a/src/extract.c b/src/extract.c index 1caa6f6..f1b75e8 100644 --- a/src/extract.c +++ b/src/extract.c @@ -286,6 +286,10 @@ #endif + /* + * http://stackoverflow.com/questions/7292642/grabbing-output-from-exec + */ + if(pipe(link) == -1){ syslog(LOG_PRIORITY, "%s: cannot open link", sdata->ttmpfile); return; @@ -293,6 +297,8 @@ if((pid = fork()) == -1){ syslog(LOG_PRIORITY, "%s: cannot fork", sdata->ttmpfile); + close(link[0]); + close(link[1]); return; }