Re: cvs commit: src/lib/libc_r/uthread uthread_write.c

From: Daniel Eischen <eischen_at_vigrid.com>
Date: Wed, 17 Dec 2003 14:14:13 -0500 (EST)
On Wed, 17 Dec 2003, Nate Lawson wrote:

> On Wed, 17 Dec 2003, Daniel Eischen wrote:
> >   Modified files:
> >     lib/libc_r/uthread   uthread_write.c
> >   Log:
> >   Return to the caller if write() returns 0.
> >
> >   PR:     59291
> >
> >   Revision  Changes    Path
> >   1.23      +2 -0      src/lib/libc_r/uthread/uthread_write.c
> >
> > --- src/lib/libc_r/uthread/uthread_write.c:1.22	Mon Sep 29 06:41:26 2003
> > +++ src/lib/libc_r/uthread/uthread_write.c	Wed Dec 17 08:44:03 2003
> >  #include <sys/types.h>
> > _at__at_ -138,6 +138,8 _at__at_
> >  					ret = num;
> >  				else
> >  					ret = n;
> > +				if (n == 0)
> > +					break;
> >
> >  			/* Check if the write has completed: */
> >  			} else if (num >= nbytes)
> 
> Thanks!  Oh what a difference one retval makes.

Does this fix something other than bacula?

-- 
Dan Eischen
Received on Wed Dec 17 2003 - 11:14:25 UTC