Return to the caller if write() returns 0.
PR: 59291
This commit is contained in:
parent
e768886dfc
commit
6512f49fe6
@ -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…
x
Reference in New Issue
Block a user