X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/774ef68f00d3b83a869119720af93b6d57731041..773f2bd47f48b737cef2852341b86f5d086a5fef:/util.c diff --git a/util.c b/util.c index 644553e6..4301465e 100644 --- a/util.c +++ b/util.c @@ -131,6 +131,8 @@ int piped_child(char **command,int *f_in,int *f_out) fprintf(FERROR,"Failed to dup/close : %s\n",strerror(errno)); exit_cleanup(1); } + if (to_child_pipe[0] != STDIN_FILENO) close(to_child_pipe[0]); + if (from_child_pipe[1] != STDOUT_FILENO) close(from_child_pipe[1]); execvp(command[0], command); fprintf(FERROR,"Failed to exec %s : %s\n", command[0],strerror(errno));