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:
Eric Andersen
2003-10-09 08:35:42 +00:00
parent 638da75f4b
commit dae099b2f9
3 changed files with 50 additions and 1 deletions

View File

@ -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. */