summaryrefslogtreecommitdiffstats
path: root/lib/libc_r
diff options
context:
space:
mode:
authordeischen <deischen@FreeBSD.org>2003-12-17 16:44:03 +0000
committerdeischen <deischen@FreeBSD.org>2003-12-17 16:44:03 +0000
commit82fa343f7ced46678be77ffd35bfe7aadbfb8173 (patch)
tree64174cc6051cd71461154ac9ac08466eadfbdaff /lib/libc_r
parent492b28d48bd32183839e5040a37d6da7b3a2ffe0 (diff)
downloadFreeBSD-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.c2
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)
OpenPOWER on IntegriCloud