diff -u -r --new-file --exclude=CVS rsync-2.4.2/cvs.log rsync-2.4.3/cvs.log --- rsync-2.4.2/cvs.log Fri Mar 31 00:24:51 2000 +++ rsync-2.4.3/cvs.log Sun Apr 9 12:54:04 2000 @@ -11122,3 +11122,94 @@ Log Message: preparing for release of 2.4.2 + +**************************************** +Date: Sunday April 9, 2000 @ 12:16 +Author: tridge + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv23523 + +Modified Files: + util.c +Log Message: +a very simple fix - if I'd only thought if it last week :) + +rsh relies on stdin being blocking +ssh relies on stdout being non-blocking + +what we've done before is to set both stdin and stdout to either +blocking or non-blocking. Now I set stdin to blocking and stdout to +non-blocking. This seems to fix all cases I've tested. + + + +**************************************** +Date: Sunday April 9, 2000 @ 12:32 +Author: tridge + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv3802 + +Modified Files: + io.c +Log Message: +don't pprint the IO timeout message if we are a server or daemon (can +cause recursive error messages) + + + +**************************************** +Date: Sunday April 9, 2000 @ 12:32 +Author: tridge + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv20063 + +Modified Files: + main.c +Log Message: +use 1 second sleeps in the sleep loop as some OSes (NT for example) +don't get interrupted during a sleep. + + + +**************************************** +Date: Sunday April 9, 2000 @ 12:36 +Author: tridge + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv5599 + +Modified Files: + proto.h +Log Message: +prototype for set_blocking() function + + + +**************************************** +Date: Sunday April 9, 2000 @ 12:53 +Author: rsync-bu + +Update of /data/cvs/rsync +In directory samba:/data/people/rsync-bugs/rsync + +Modified Files: + version.h +Log Message: +preparing for release of 2.4.3 + + +**************************************** +Date: Sunday April 9, 2000 @ 12:53 +Author: rsync-bu + +Update of /data/cvs/rsync/packaging/redhat/5.0 +In directory samba:/data/people/rsync-bugs/rsync/packaging/redhat/5.0 + +Modified Files: + rsync.spec +Log Message: +preparing for release of 2.4.3 + diff -u -r --new-file --exclude=CVS rsync-2.4.2/io.c rsync-2.4.3/io.c --- rsync-2.4.2/io.c Fri Mar 31 00:23:02 2000 +++ rsync-2.4.3/io.c Sun Apr 9 12:53:30 2000 @@ -49,6 +49,7 @@ static void check_timeout(void) { + extern int am_server, am_daemon; time_t t; if (!io_timeout) return; @@ -61,8 +62,10 @@ t = time(NULL); if (last_io && io_timeout && (t-last_io) >= io_timeout) { - rprintf(FERROR,"io timeout after %d second - exiting\n", - (int)(t-last_io)); + if (!am_server && !am_daemon) { + rprintf(FERROR,"io timeout after %d second - exiting\n", + (int)(t-last_io)); + } exit_cleanup(RERR_TIMEOUT); } } diff -u -r --new-file --exclude=CVS rsync-2.4.2/main.c rsync-2.4.3/main.c --- rsync-2.4.2/main.c Fri Mar 31 00:23:02 2000 +++ rsync-2.4.3/main.c Sun Apr 9 12:53:30 2000 @@ -324,9 +324,10 @@ write_int(recv_pipe[1],1); close(recv_pipe[1]); io_flush(); - /* finally we go to sleep until our parent kills us with - a USR2 signal */ - while (1) sleep(60); + /* finally we go to sleep until our parent kills us + with a USR2 signal. We sleepp for a short time as on + some OSes a signal won't interrupt a sleep! */ + while (1) sleep(1); } close(recv_pipe[1]); diff -u -r --new-file --exclude=CVS rsync-2.4.2/packaging/redhat/5.0/rsync.spec rsync-2.4.3/packaging/redhat/5.0/rsync.spec --- rsync-2.4.2/packaging/redhat/5.0/rsync.spec Fri Mar 31 00:24:32 2000 +++ rsync-2.4.3/packaging/redhat/5.0/rsync.spec Sun Apr 9 12:53:56 2000 @@ -1,10 +1,10 @@ Summary: Program for efficient remote updates of files. Name: rsync -Version: 2.4.2 +Version: 2.4.3 Release: 1 Copyright: GPL Group: Applications/Networking -Source: ftp://samba.anu.edu.au/pub/rsync/rsync-2.4.2.tar.gz +Source: ftp://samba.anu.edu.au/pub/rsync/rsync-2.4.3.tar.gz URL: http://samba.anu.edu.au/rsync/ Packager: Andrew Tridgell BuildRoot: /tmp/rsync diff -u -r --new-file --exclude=CVS rsync-2.4.2/proto.h rsync-2.4.3/proto.h --- rsync-2.4.2/proto.h Fri Mar 31 00:23:03 2000 +++ rsync-2.4.3/proto.h Sun Apr 9 12:53:30 2000 @@ -175,6 +175,7 @@ void send_uid_list(int f); void recv_uid_list(int f, struct file_list *flist); void set_nonblocking(int fd); +void set_blocking(int fd); int fd_pair(int fd[2]); int piped_child(char **command,int *f_in,int *f_out); int local_child(int argc, char **argv,int *f_in,int *f_out); diff -u -r --new-file --exclude=CVS rsync-2.4.2/util.c rsync-2.4.3/util.c --- rsync-2.4.2/util.c Fri Mar 31 00:23:04 2000 +++ rsync-2.4.3/util.c Sun Apr 9 12:53:31 2000 @@ -28,10 +28,7 @@ /**************************************************************************** -Set a fd into nonblocking mode. Uses POSIX O_NONBLOCK if available, -else -if SYSV use O_NDELAY -if BSD use FNDELAY +Set a fd into nonblocking mode ****************************************************************************/ void set_nonblocking(int fd) { @@ -45,6 +42,21 @@ } } +/**************************************************************************** +Set a fd into blocking mode +****************************************************************************/ +void set_blocking(int fd) +{ + int val; + + if((val = fcntl(fd, F_GETFL, 0)) == -1) + return; + if (val & NONBLOCK_FLAG) { + val &= ~NONBLOCK_FLAG; + fcntl(fd, F_SETFL, val); + } +} + /* create a file descriptor pair - like pipe() but use socketpair if possible (because of blocking issues on pipes) @@ -70,7 +82,7 @@ } -/* this is taken from CVS */ +/* this is derived from CVS code */ int piped_child(char **command,int *f_in,int *f_out) { int pid; @@ -103,6 +115,7 @@ if (to_child_pipe[0] != STDIN_FILENO) close(to_child_pipe[0]); if (from_child_pipe[1] != STDOUT_FILENO) close(from_child_pipe[1]); umask(orig_umask); + set_blocking(STDIN_FILENO); execvp(command[0], command); rprintf(FERROR,"Failed to exec %s : %s\n", command[0],strerror(errno)); diff -u -r --new-file --exclude=CVS rsync-2.4.2/version.h rsync-2.4.3/version.h --- rsync-2.4.2/version.h Fri Mar 31 00:24:31 2000 +++ rsync-2.4.3/version.h Sun Apr 9 12:53:55 2000 @@ -1 +1 @@ -#define VERSION "2.4.2" +#define VERSION "2.4.3"