[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Bug with svn+ssh (plus workaround)

From: Alan Barrett <apb_at_cequrux.com>
Date: 2006-03-21 18:45:35 CET

On Tue, 21 Mar 2006, Alan Barrett wrote:
> As a workaround, I pointed the SVN_SSH environment variable to this
> script, and everything worked correctly:
>
> #!/bin/sh
> # Run ssh in such a way that a pipe through a "cat" process is
> # interposed between the inner fd 2 (stderr) seen by the ssh
> # command, and the outer fd 2 (stderr) seen by our caller (which
> # is typically "svn"). This insulates the outer fd 2 from ssh's
> # habit of putting the inner fd 2 into non-blocking mode.
> PATH=/bin:/usr/bin
> REAL_SSH=/usr/bin/ssh
> exec 4>&1
> exec "${REAL_SSH}" ${1+"$@"} 1>&4 2>&1 4>&- | cat 1>&2

Of course, the last line should have been

    exec "${REAL_SSH}" ${1+"$@"} 2>&1 1>&4 4>&- | cat 1>&2

The incorrect version appeared to work because ssh didn't actually
write anything to stderr.

--apb (Alan Barrett)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Mar 21 18:46:37 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.