configure --with-rsh=CMD and default blocking-IO support

Wayne Davison wayned at users.sourceforge.net
Wed Feb 6 16:38:04 EST 2002


On Wed, 6 Feb 2002, Martin Pool wrote:
> OK, I agree --with-rsh should go in, but I think putting magic
> characters into it is needlessly confusing.  I would feel much better
> about a separate configure option to set the default O_NONBLOCK mode.

The complicating factor then becomes: how does the RSYNC_RSH environment
variable interact with this default O_NONBLOCK mode, and how can the
default blocking be changed via the environment?  I came up with the
magic character idea in order to try to keep things simple (using only
one environment variable instead of trying to keep two different ones in
sync).  I admit that it's quirky, though.

So the obvious alternative is something like this:

    export RSYNC_RSH=ssh
    export RSYNC_BLOCKING_IO=1

Perhaps a better idiom might be allow RSYNC_RSH to begin with a
command-line option?  If the string begins with "--blocking-io " we
strip it off and twiddle that command-line flag?  If we want to make
this orthogonal we could also add support for the --non-blocking-io
command-line option and allow this string to appear at the start of
the RSYNC_RSH value.  What do you think of something like this?

    export RSYNC_RSH='--blocking-io /usr/bin/ssh -l username'
    export RSYNC_RSH='--non-blocking-io rsh'

Or can you think of a better way to go?

..wayne..





More information about the rsync mailing list