rsync (sometimes) hangs when trying to build a batch file containing hardlinked files. Here's a way to reproduce the problem: mkdir new; cd new; mkdir a; mkdir a/b; mkdir c; touch a/b/1; ln a/b/1 c/2; cd ..; rsync --only-write-batch=batch_file -a -H --delete new/ old/ Expected result: rsync exits normally (leaving behind a well-formed batch_file) or at least exits with an error Actual result: rsync hangs indefinitely, causing any script which called it to wait on it forever I confirmed the issue with the sources in http://rsync.samba.org/ftp/rsync/nightly/rsync-HEAD-20111022-1730GMT.tar.gz but 3.0.9 was already affected.
I'm checking in a fix for this. Thanks for the report!
*** Bug 8804 has been marked as a duplicate of this bug. ***