Is this condition (am_server == 1 and am_daemon == 0) possible ?

Matt McCutchen hashproduct+rsync at
Thu Feb 15 03:37:54 GMT 2007

On 2/14/07, Qi Yong <qiyong at> wrote:
> If so, what is (am_server ==1 and am_daemon == 1) for?

For an rsync daemon process handling an individual request.  Here's a
listing of all the cases (Wayne please correct me if necessary):

am_server = 0, am_daemon = 0: client called by user from the command line
am_server = 1, am_daemon = 0: server invoked over a remote shell or
forked locally by client
am_server = 0, am_daemon = 1: main process of non-single-use daemon
am_server = 1, am_daemon = 1: single-use daemon, or daemon process
handling an individual request

Independent of this are am_sender and am_generator.  Those are never
both 1.  If both are 0, the process is the receiver.

> I mean main can call start_client after start_server returns.

This is not possible because start_server never returns: it ends with
exit_cleanup(0), which exits the process.


More information about the rsync mailing list