mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-17 10:26:15 +00:00
Return to the caller if write() returns 0.
PR: 59291
This commit is contained in:
parent
e768886dfc
commit
6512f49fe6
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=123610
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user