summaryrefslogtreecommitdiff
path: root/libbb/full_write.c
diff options
context:
space:
mode:
authorEric Andersen2003-10-09 08:35:42 +0000
committerEric Andersen2003-10-09 08:35:42 +0000
commitdae099b2f96ba46bfdd6b598b06dc88713b2d0e8 (patch)
tree0490983c989cc1fac5a5e5f34eb076d17c594e75 /libbb/full_write.c
parent638da75f4b82e3156d30705412b545d172870fc0 (diff)
downloadbusybox-dae099b2f96ba46bfdd6b598b06dc88713b2d0e8.zip
busybox-dae099b2f96ba46bfdd6b598b06dc88713b2d0e8.tar.gz
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.
Diffstat (limited to 'libbb/full_write.c')
-rw-r--r--libbb/full_write.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libbb/full_write.c b/libbb/full_write.c
index 6f22555..30c7a50 100644
--- a/libbb/full_write.c
+++ b/libbb/full_write.c
@@ -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. */