From dae099b2f96ba46bfdd6b598b06dc88713b2d0e8 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Thu, 9 Oct 2003 08:35:42 +0000 Subject: 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. --- include/libbb.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/libbb.h b/include/libbb.h index eb6841d33..7587a407c 100644 --- a/include/libbb.h +++ b/include/libbb.h @@ -109,6 +109,7 @@ extern int is_directory(const char *name, int followLinks, struct stat *statBuf) extern int remove_file(const char *path, int flags); extern int copy_file(const char *source, const char *dest, int flags); extern ssize_t safe_read(int fd, void *buf, size_t count); +extern ssize_t safe_write(int fd, void *buf, size_t count); extern ssize_t bb_full_write(int fd, const void *buf, size_t len); extern ssize_t bb_full_read(int fd, void *buf, size_t len); extern int recursive_action(const char *fileName, int recurse, -- cgit v1.2.3