Richard Stallman <[EMAIL PROTECTED]> writes:

> However, using --cvs-workaround=e seems to fix it.  Again I tried
> three times, and it worked all three times.

That's good news.

> Niels, what precisely does --cvs-workaround=e do that differs from the
> usual case?

The "usual case" is that lsh puts its stderr file descriptor into
non-blocking mode. With --cvs-workaround=e, it doesn't do that.

Instead, it creates a pipe, forks off an extra process that copies
data from the readable end of the pipe to the real stderr. lsh then
puts the writeable end of the pipe into non-blocking mode and uses
that fd instead of the real stderr.

Data written to stderr includes

1. lsh's own diagnostic messages. There's no reason to use
   non-blocking mode for this, the writes are actually performed in a
   blocking way regardless.

2. Data from the stderr of the remote process. This is written using
   lsh's central select/poll-loop, and is properly flow-controlled. If
   writing to stderr would block, at most one window of data is
   buffered, and the remote end is told not to send any more.
   Flow-control is a central feature of the "channel" mechanism in the
   ssh protocol.

/Niels

Reply via email to