summaryrefslogtreecommitdiffstats
path: root/bar.c
diff options
context:
space:
mode:
authorMarkus F.X.J. Oberhumer <markus@oberhumer.com>2021-04-15 07:43:13 +0200
committerMarkus F.X.J. Oberhumer <markus@oberhumer.com>2021-04-15 07:43:13 +0200
commit68622a02adfa7ebd3a195667d3fbf8e1f10ca93f (patch)
tree8dd77202cd9cdbf5f59ae42dd3293d87fbabcfbb /bar.c
parent1d8bbdc1a59fd5246ec60bc3db1ece055ef83639 (diff)
downloadbfs-68622a02adfa7ebd3a195667d3fbf8e1f10ca93f.tar.xz
util: introduce safe versions of read & write that handle interrupted
systems calls.
Diffstat (limited to 'bar.c')
-rw-r--r--bar.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bar.c b/bar.c
index e1e2857..67f5d6e 100644
--- a/bar.c
+++ b/bar.c
@@ -60,7 +60,7 @@ static int ass_puts(int fd, const char *str) {
size_t len = strlen(str);
while (len > 0) {
- ssize_t ret = write(fd, str, len);
+ ssize_t ret = safe_write(fd, str, len);
if (ret <= 0) {
return -1;
}