where a rsync receive process could hang around after the connection
has gone away if a fatal error occurs (such as someone killing the
other end)
if ((pid=do_fork()) == 0) {
if ((pid=do_fork()) == 0) {
recv_files(f_in,flist,local_name,recv_pipe[1]);
if (am_daemon) report(-1);
exit_cleanup(0);
}
recv_files(f_in,flist,local_name,recv_pipe[1]);
if (am_daemon) report(-1);
exit_cleanup(0);
}
generate_files(f_out,flist,local_name,recv_pipe[0]);
waitpid(pid, &status, 0);
generate_files(f_out,flist,local_name,recv_pipe[0]);
waitpid(pid, &status, 0);