Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Dec 2003 10:22:29 -0800 (PST)
From:      Nate Lawson <nate@root.org>
To:        Daniel Eischen <deischen@FreeBSD.org>
Cc:        cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/lib/libc_r/uthread uthread_write.c
Message-ID:  <20031217102125.R70565@root.org>
In-Reply-To: <20031217164417.010BE16A55B@hub.freebsd.org>
References:  <20031217164417.010BE16A55B@hub.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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>
> @@ -138,6 +138,8 @@
>  					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.

-Nate



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031217102125.R70565>