X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/87ba7282f696e74d78d4ff5f1d7f80c98a5fb946..ba449e444b36aee2464b47f84469bb6db186e39c:/main.c diff --git a/main.c b/main.c index 20c93c25..2baac16a 100644 --- a/main.c +++ b/main.c @@ -486,7 +486,12 @@ static int do_recv(int f_in,int f_out,struct file_list *flist,char *local_name) io_flush(NORMAL_FLUSH); - if ((pid = do_fork()) == 0) { + if ((pid = do_fork()) == -1) { + rsyserr(FERROR, errno, "fork failed in do_recv()"); + exit_cleanup(RERR_IPC); + } + + if (pid == 0) { close(error_pipe[0]); if (need_name_pipe) { close(name_pipe[1]);