Amir Rapson
2009-Jun-11 12:42 UTC
rsync occassionally issues the message "rsync error: unexplained error (code 255) at main.c(1506) [generator=3.0.4]"
Hi,
Please try this patch below, I think it?ll solve the bug?
Amir
diff -U 5 -Nuir rsync-3.0.4/cleanup.c rsync-3.0.4.new/cleanup.c
--- rsync-3.0.4/cleanup.c 2008-06-04 19:01:02.000000000 +0300
+++ rsync-3.0.4.new/cleanup.c 2009-03-29 09:45:04.000000000 +0300
@@ -98,11 +98,11 @@
static int unmodified_code = 0;
SIGACTION(SIGUSR1, SIG_IGN);
SIGACTION(SIGUSR2, SIG_IGN);
- if (exit_code) /* Preserve first error code when recursing. */
+ if (exit_code && exit_code != 255) /* Preserve first specific error
code
when recursing. */
code = exit_code;
/* If this is the exit at the end of the run, the server side
* should not attempt to output a message (see log.c). */
if (am_server && code == 0)
@@ -127,11 +127,11 @@
if (cleanup_child_pid != -1) {
int status;
int pid = wait_process(cleanup_child_pid, &status, WNOHANG);
if (pid == cleanup_child_pid) {
status = WEXITSTATUS(status);
- if (status > code)
+ if (status > code && status != 255)
code = exit_code = status;
}
}
/* FALLTHROUGH */
-------------- next part --------------
HTML attachment scrubbed and removed
Reasonably Related Threads
- DO NOT REPLY [Bug 6461] New: rsync occassionally issues the message "rsync error: unexplained error (code 255) at main.c(1506) [generator=3.0.4]"
- rsync error: unexplained error
- "Unexplained error code xxx" in rsync-2.5.5
- Problem with child process exit status.
- patch: interrupting ssh when it's asking for a password turns off echo in the shell
