diff options
author | deischen <deischen@FreeBSD.org> | 2003-12-17 16:44:03 +0000 |
---|---|---|
committer | deischen <deischen@FreeBSD.org> | 2003-12-17 16:44:03 +0000 |
commit | 82fa343f7ced46678be77ffd35bfe7aadbfb8173 (patch) | |
tree | 64174cc6051cd71461154ac9ac08466eadfbdaff /lib/libc_r | |
parent | 492b28d48bd32183839e5040a37d6da7b3a2ffe0 (diff) | |
download | FreeBSD-src-82fa343f7ced46678be77ffd35bfe7aadbfb8173.zip FreeBSD-src-82fa343f7ced46678be77ffd35bfe7aadbfb8173.tar.gz |
Return to the caller if write() returns 0.
PR: 59291
Diffstat (limited to 'lib/libc_r')
-rw-r--r-- | lib/libc_r/uthread/uthread_write.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libc_r/uthread/uthread_write.c b/lib/libc_r/uthread/uthread_write.c index 123a88e..573e78e 100644 --- a/lib/libc_r/uthread/uthread_write.c +++ b/lib/libc_r/uthread/uthread_write.c @@ -138,6 +138,8 @@ _write(int fd, const void *buf, size_t nbytes) ret = num; else ret = n; + if (n == 0) + break; /* Check if the write has completed: */ } else if (num >= nbytes) |