Created attachment 15469 [details] patch for the issue The atomic-rsync script uses the call "exit $?" on a failed system() invocation. $? is a 16-bit wait status, and exit() expects an 8-bit integer. The lower 16 bits are used as the exit status. For instance, if the called program exits 1, $? is 256, with 1 in the high 8 bits. In this situation atomic-rsync exits 0, but the operation failed. I made a patch. Now it just exits 1 without trying to pass the child's status.
Why not exit with $? >> 8?
(In reply to Paul Slootman from comment #1) That was, in fact, my first try. exit $? >> 8 is recommended for Perl by some sources on the net. However, if the called program gets a signal, "exit $? >> 8" would cause atomic-rsync to exit 0, which is also not the right thing. There are other correct solutions to this problem, but I think the simplest and most expedient is exit 1, especially given that atomic-rsync has been exiting 0 under failure conditions.
Thanks! Fixed in git.