bug-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CVS problem with ssh


From: Richard M. Stallman
Subject: Re: CVS problem with ssh
Date: Fri, 24 Jun 2005 12:37:26 -0400

    > It's possible that this fix is a full and correct solution.  If the
    > descriptor has room for at least one byte, `write' won't return
    > EAGAIN; it will write at least one byte.  It may write less than the
    > whole buffer that was specified.  If the stdio code handles that case
    > correctly, the results should be correct.

    That depends on your definition of "correctly".  I suspect that all
    stdio implementations handle short writes by immediately doing another
    write for the remaining data, which in this case will immediately fail
    with EAGAIN and we're back to where we started.

If that's what happens, it ought to give good results.  When the
second `write' call fails with EAGAIN, the "temporary workaround" will
call `select' and wait until there is space.  This may not be
optimally elegant, but it is adequate.  It will write all the data,
and it won't busy-wait.  Do we need more?

    > If the current fix does not make it correct, please do make the larger
    > fix--do your own buffering.  That is surely not really a large job.

    Replacing stdio isn't a large job?!?

Replacing stdio, that is to say writing another stdio implementation,
would be a large job, but doing your own buffering is a much smaller
job.  You can still use the complex parts of stdio, via sprintf, if
you need them.

However, it currently looks like no further change is needed.

    > The right program to fix, in a case like this, is whichever one we
    > actually can get fixed.

    No, the right program to fix is the one that's broken: ssh.

My understanding is that the openssh developers don't think that this
is broken, and declined to change it.  However, I am not sure of that.
Do you know?

If you convince them to change this, that would be fine.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]