X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/ef5d23ebcd67a59d2f89fbb5004c9ece4cc4d887..c80ccabb0cfbdbc60a4ff4f885cd8f7d4eaed6d0:/util.c diff --git a/util.c b/util.c index 7c589b37..e4ebd254 100644 --- a/util.c +++ b/util.c @@ -88,6 +88,7 @@ int piped_child(char **command,int *f_in,int *f_out) int pid; int to_child_pipe[2]; int from_child_pipe[2]; + extern int blocking_io; if (fd_pair(to_child_pipe) < 0 || fd_pair(from_child_pipe) < 0) { @@ -116,6 +117,9 @@ int piped_child(char **command,int *f_in,int *f_out) if (from_child_pipe[1] != STDOUT_FILENO) close(from_child_pipe[1]); umask(orig_umask); set_blocking(STDIN_FILENO); + if (blocking_io) { + set_blocking(STDOUT_FILENO); + } execvp(command[0], command); rprintf(FERROR,"Failed to exec %s : %s\n", command[0],strerror(errno));