+manpagesection(DIAGNOSTICS)
+
+rsync occasionally produces error messages that may seem a little
+cryptic. The one that seems to cause the most confusion is "protocol
+version mismatch - is your shell clean?".
+
+This message is usually caused by your startup scripts or remote shell
+facility producing unwanted garbage on the stream that rsync is using
+for its transport. The way to diagnose this problem is to run your
+remote shell like this:
+
+verb(
+ rsh remotehost /bin/true > out.dat
+)
+
+then look at out.dat. If everything is working correctly then out.dat
+should be a zero length file. If you are getting the above error from
+rsync then you will probably find that out.dat contains some text or
+data. Look at the contents and try to work out what is producing
+it. The most common cause is incorrectly configured shell startup
+scripts (such as .cshrc or .profile) that contain output statements
+for non-interactive logins.
+
+If you are having trouble debugging include and exclude patterns, then
+try specifying the -vv option. At this level of verbosity rsync will
+show why each individual file is included or excluded.
+
+manpagesection(EXIT VALUES)
+
+startdit()
+dit(bf(RERR_SYNTAX 1)) syntax or usage error
+dit(bf(RERR_PROTOCOL 2)) protocol incompatibility
+dit(bf(RERR_FILESELECT 3)) errors selecting input/output files, dirs
+dit(bf(RERR_UNSUPPORTED 4)) requested action not supported
+dit(bf(RERR_SOCKETIO 10)) error in socket IO
+dit(bf(RERR_FILEIO 11)) error in file IO
+dit(bf(RERR_STREAMIO 12)) error in rsync protocol data stream
+dit(bf(RERR_MESSAGEIO 13)) errors with program diagnostics
+dit(bf(RERR_IPC 14)) error in IPC code
+dit(bf(RERR_SIGNAL 20)) status returned when sent SIGUSR1, SIGINT
+dit(bf(RERR_WAITCHILD 21)) some error returned by waitpid()
+dit(bf(RERR_MALLOC 22)) error allocating core memory buffers
+dit(bf(RERR_TIMEOUT 30)) timeout in data send/receive
+enddit()
+