Commit Graph

168 Commits

Author SHA1 Message Date
Wayne Davison
87cc45e136 Made my last change a little better. 2003-04-24 16:26:09 +00:00
Wayne Davison
f6b8d591f7 If the user specifies a trailing slash on the destination, make sure
that we treat it as a directory reference.
2003-04-24 16:14:33 +00:00
Wayne Davison
7bb7058e8d Made a slight tweak to the previous --stats change. 2003-04-18 20:03:41 +00:00
Wayne Davison
577ab12ce5 Only display the malloc stats if we're at least double-verbose (and
--stats was specified, of course).  Also made the output of the short
(2-line) transfer summary get prefixed with an empty line in all
cases (not just with --stats).
2003-04-17 23:44:25 +00:00
Wayne Davison
7c2a9e766c Support the new --files-from option. 2003-03-30 23:00:33 +00:00
Wayne Davison
d9c7edf63f - Fixed lots of line-indentation problems, including a really huge section
of non-batch-mode code that was indented at the same level as its
  surrounding "if" statement.
- Moved the heavily-used am_* flags into global extern vars instead of
  externing them again and again in individual functions.
- Got rid of line-ending whitespace.
2003-03-21 18:33:48 +00:00
David Dykstra
7d085960eb Remove the Cygwin msleep(100) before the generator kills the receiver,
because it caused the testsuite/unsafe-links test to hang.
2003-01-28 05:05:53 +00:00
David Dykstra
089a2435f8 Ack! I had accidentally ifdefed out the kill from the generator to the
receiver process for every platform except Cygwin.
2003-01-28 03:03:55 +00:00
David Dykstra
8ed16deb24 Change so the delay before generator signals receiver is only done on Cygwin. 2003-01-28 02:51:03 +00:00
David Dykstra
787568f371 Insert a 100ms sleep just before sending the USR2 signal to the
child receiver process to prevent some hangs on Cygwin.  Anthony
Heading discovered the workaround first and suggested 30ms, and
Greger Cronquist had better luck with 100ms.
2003-01-27 03:52:42 +00:00
Wayne Davison
b5ae4aba38 Reset the io_error_fd right before the generator kills off the receiver
(because the death of the receiver will close the fd and cause the
generator to fail in any subsequent IO).
2003-01-10 08:32:09 +00:00
David Dykstra
ee7118a816 Fixed bug that caused rsync to lose exit status of its child processes.
Based on patch submited by David R. Staples.  Todd Vander Does contributed
the following test which showed the problem:
  > mkdir /tmp/nowrite
  > chmod -w /tmp/nowrite
  > rsync /etc/group /tmp/nowrite || echo $status
  mkstemp .group.cUaaeY failed
  rsync error: partial transfer (code 23) at main.c(518)
  23
  > rsync -e ssh loki:/etc/group /tmp/nowrite || echo $status
  mkstemp .group.1rayeY failed
  > rsync -e ssh loki:/etc/group /tmp/nowrite && echo $status
  mkstemp .group.fbaGiY failed
  0
The remote copy should have returned non-zero exit code like the local copy.
2003-01-09 19:04:06 +00:00
Wayne Davison
bb4aa89c10 Don't pass "-l user" to the remote shell if we're starting a server-daemon
and the command already has a "-l user" option.
2002-08-01 20:46:59 +00:00
Wayne Davison
a125c82ad2 Allow the rsync:// URL syntax in the destination field. 2002-08-01 17:53:38 +00:00
Wayne Davison
75aeac44e8 Handle the new server-daemon via remote-shell mode. 2002-08-01 00:36:59 +00:00
Martin Pool
9fb3f7a9ab Doc rsync_panic_handler() 2002-04-08 07:46:34 +00:00
Martin Pool
734a94a20c Clean up prototype.
Drop unused variables.
2002-04-08 07:42:54 +00:00
Martin Pool
4fdc39dde8 Allow panic_action to be configured through environment variable RSYNC_PANIC_ACTION. 2002-04-08 07:34:17 +00:00
Martin Pool
b35d0d8e9a Split code out into separate files and remove some global variables to
reduce symbol dependencies between files and therefore make it easier
to write unit tests.  The diff is large, but the actual code changes
are pretty small.
2002-04-08 04:10:20 +00:00
Martin Pool
25d34a5c80 Rearrange code slightly to avoid util.c depending on main.c. 2002-04-08 03:37:19 +00:00
Martin Pool
c053133207 If configured with --enable-maintainer-mode, then on receipt of a
fatal signal rsync will try to open an xterm running gdb, similarly to
Samba's "panic action" or GNOME's bug-buddy.
2002-03-27 05:10:44 +00:00
Martin Pool
9098bbf3b3 Improved network error handling. (Greg A. Woods) 2002-03-27 01:03:13 +00:00
Martin Pool
c1a04ecbfd Doc. 2002-03-22 05:08:53 +00:00
Martin Pool
bceec82f35 Previous solution for --no-whole-file would probably break when
connecting to old servers that don't have --no-whole-file.

Instead, we handle no_whole_file and whole_file separately, without
the magic -1 value.  We don't modify no_whole_file after
initialization.
2002-03-19 03:39:42 +00:00
Martin Pool
0f0ea7f779 Add UNUSED macro that expands to a parameter attribute annotation on
gcc, to quieten its worries about parameters that must always be
unused.
2002-02-23 00:17:50 +00:00
Martin Pool
0b4af330ce Doc. 2002-02-23 00:12:11 +00:00
Martin Pool
b84ba8967a rsync prefix on mkdir and pushdir error messages. 2002-02-19 01:07:24 +00:00
Martin Pool
34758d5c15 Ignore SIGPIPE and allow EPIPE to get through to the program so that
we don't get stuck in a recursive loop trying to report a broken pipe
across that same broken pipe.  Debian bug #128632 (Colin Walters)
2002-02-18 20:06:57 +00:00
David Dykstra
088aac8597 Make batch mode actually work and add man page documentation. From Jos Backus. 2002-02-06 21:20:48 +00:00
David Dykstra
93689aa51a Add --no-whole-file and --no-blocking-io options 2002-02-05 23:05:31 +00:00
Martin Pool
8694312695 Add dummy show_flist_stats(). 2002-01-25 10:06:36 +00:00
Martin Pool
76f79ba748 Patch from Jos Backus -- Fix breakage from dev_t to DEV64_T in batch
mode.

Also, drop -f and -F for batch mode: these should be reserved for
options that are more commonly used.

It also appends a newline to the argvs file and skips adding the
source directory to the command line.
2002-01-23 05:51:06 +00:00
Martin Pool
5c15e29f2b Better mallinfo() output in --stats 2002-01-11 07:26:39 +00:00
Martin Pool
e5a2b8544d Look for mallinfo() and use it to display
heap usage information in --stats
2002-01-11 07:16:11 +00:00
Martin Pool
7169bb4aa9 Fix a bug introduced in 1.119, whereby strings like
"mirror.aarnet.edu.au::" were not properly digested.

It wasn't even my bug! :-)
2001-08-15 07:50:07 +00:00
Martin Pool
08a740ff43 Fix casts when some variables are printed out. 2001-08-15 06:41:24 +00:00
Martin Pool
b67381d0dc Drop dead variables introduced in rsync+ patch. 2001-08-15 06:38:23 +00:00
Martin Pool
6902ed178b Merge across rsync+ patch; add a little documentation to the manpage. More documentation would be better. 2001-08-14 02:04:47 +00:00
Martin Pool
e1bd49d6f3 Try to fix "infinite loop" warning on AIX and other compilers. (We
exit on a signal.)
2001-08-06 12:25:45 +00:00
Andrew Tridgell
029c171330 reap children in sigchld handler 2001-07-17 10:48:31 +00:00
Andrew Tridgell
6c65e14634 applied simple nohang patch from Wayne Davison 2001-06-26 01:20:42 +00:00
David Dykstra
a1a440c23e Make --whole-file the default when source and target are on the local machine. 2001-05-29 14:37:54 +00:00
Andrew Tridgell
19b27a485e improved error handling again. Now we report messages for the remote
shell failing and propogate errors in a better fashion
2001-03-23 01:26:04 +00:00
Andrew Tridgell
ff81e809f4 new error handling system
we now give a non-0 exit code if *any* of the files we have been asked
to transfer fail to transfer
2001-03-22 07:36:51 +00:00
Martin Pool
0882faa2b2 Doc. 2001-03-16 02:11:53 +00:00
Martin Pool
5013576705 Change from getopt to popt. 2001-02-23 00:45:07 +00:00
Martin Pool
305ab1331b Doc. 2001-02-21 08:25:07 +00:00
Martin Pool
0ba481368c Add some comments. 2000-11-02 11:37:34 +00:00
Andrew Tridgell
38bf526fc5 fix bug in handling of : 2000-10-31 10:59:50 +00:00
Andrew Tridgell
c32d024071 don't clobber argv[0], so ps shows the right thing 2000-10-19 00:47:48 +00:00