We did not have a safe_write, which is the analog to safe_read. Convert
full_write to use safe_write internally, which is needed to guarantee proper behavior, i.e. when writing to a pipe.
This commit is contained in:
@ -36,7 +36,7 @@ ssize_t bb_full_write(int fd, const void *buf, size_t len)
|
||||
total = 0;
|
||||
|
||||
while (len > 0) {
|
||||
cc = write(fd, buf, len);
|
||||
cc = safe_write(fd, buf, len);
|
||||
|
||||
if (cc < 0)
|
||||
return cc; /* write() returns -1 on failure. */
|
||||
|
Reference in New Issue
Block a user