configure --with-rsh=CMD and default blocking-IO support
Dave Dykstra
dwd at bell-labs.com
Fri Feb 8 06:13:20 EST 2002
On Wed, Feb 06, 2002 at 02:56:38PM -0800, Wayne Davison wrote:
> On Wed, 6 Feb 2002, Dave Dykstra wrote:
> > Of the proposed alternatives, I like this latter the best, changing
> > --non-blocking-io to --no-blocking-io.
>
> Cool. I like that one as well. Here's an implementation. This patch
> adds the configure option --with(out)-blocking-io and defines a new
> variable that gets put into config.h: DEFAULT_BLOCKING_IO.
>
> The default for configure is just as before: remsh or rsh gets used
> with blocking IO on by default. If the user specifies --with-rsh=CMD
> then the default is --without-blocking-io unless the user also specifies
> the --with-blocking-io configure option.
>
> The code in main.c now uses the DEFAULT_BLOCKING_IO value, but only when
> we use the default RSYNC_RSH (internal) value. If the user specifies an
> RSYNC_RSH environment variable (or a remote shell via the command-line),
> the default is to use non-blocking IO. (This is a slight change in
> behavior if the user had set RSYNC_RSH=rsh in their environment -- is
> this acceptable?)
>
> The code now allows the remote shell value to contain a single prefixed
> IO-blocking option. If the string starts with "--" and it has a space
> in it, the string must start with "--blocking-io ", "--no-blocking-io ",
> or "-- " (the last item allows someone to use a program name that
> matches one of our options -- just for completeness).
I didn't test it, but I looked over the code and it looks OK to me.
> I also updated the main man page to mention the new RSYNC_RSH syntax,
> and also to not talk like rsh is always the default remote shell. In
> the --blocking-io section, it used to say that ssh prefers blocking IO.
> I've never used anything but non-blocking IO with ssh, so is this
> statement backwards? I tweaked the statement to say that only some
> versions of ssh prefer blocking IO.
You're right, that is backwards. It should say "Ssh prefers non-blocking IO".
> Don't forget to run autoconf and autoheader after applying this patch.
- Dave
More information about the rsync
mailing list