diff options
author | Eric Andersen | 2003-10-09 08:35:42 +0000 |
---|---|---|
committer | Eric Andersen | 2003-10-09 08:35:42 +0000 |
commit | dae099b2f96ba46bfdd6b598b06dc88713b2d0e8 (patch) | |
tree | 0490983c989cc1fac5a5e5f34eb076d17c594e75 /libbb/full_write.c | |
parent | 638da75f4b82e3156d30705412b545d172870fc0 (diff) | |
download | busybox-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.c | 2 |
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. */ |