[Bug 961] CVS annotate problems

Mark D. Baushke mdb at juniper.net
Fri Dec 10 20:05:55 EST 2004

bugzilla-daemon at mindrot.org writes:

> http://bugzilla.mindrot.org/show_bug.cgi?id=961

> I had a problem that CVS annotate from emacs didn't work. Lines were
> missing from the output. I was told on gnu.emacs.help, that this was
> an SSH/CVS/libc interaction problem that also affected other tools
> such as rsync, and was told to make the CVS_RSH enviroment variable
> point to the following bourne shell script:
> #!/bin/sh
> (ssh "$@" 2>&1 1>&3 | cat) 3>&1 1>&2
> Using the script fixed the problem for me, but it would be nice not to
> need it.

FYI. Both cvs-1.11.18 (the stable branch release)
and cvs-1.12.10 (the feature branch release) have
a workaround for your problem.

The difficulty is that SSH puts stdout into
non-blocking mode via a redirection of stderr. In
turn, this may lead to fwrite() and/or fflush()
failing with EAGAIN which was not expected by
previous versions of CVS (rsh does not exhibit
this misbehavior).

I agree that it would be nice if SSH did not make
stdout non-blocking just because stderr has been
redirected to it.

	-- Mark

More information about the openssh-unix-dev mailing list