Patch for stdout/stderr buffer flush write() handling

Carson Gaspar carson at taltos.org
Sun Jun 17 06:57:31 EST 2001



--On Saturday, June 16, 2001 10:36 AM +0200 Markus Friedl 
<markus.friedl at informatik.uni-erlangen.de> wrote:

> On Fri, Jun 15, 2001 at 03:19:16PM -0700, Carson Gaspar wrote:
>> The attached patch against today's CVS improves write() error handling
>> and  logging in clientloop.c when flushing stdout/stderr.
>
> you can get EAGAIN if the fd is blocking?

Not on any UNIX I know of, but that's not the point. EAGAIN is a non-fatal 
error, and we've just encountered a situation where another part of the 
code made the fd non-blocking. The old code couldn't handle this, and died. 
After the patch, it will do the right thing no matter what. This makes the 
code more resilient to bizarre OS behaviour, and to intentional or 
unintentional code changes.

-- 
Carson




More information about the openssh-unix-dev mailing list