summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/pacman/pacman.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c
index f4f80449..574a4a8a 100644
--- a/src/pacman/pacman.c
+++ b/src/pacman/pacman.c
@@ -234,7 +234,9 @@ static void cleanup(int ret) {
static ssize_t xwrite(int fd, const void *buf, size_t count)
{
ssize_t ret;
- while((ret = write(fd, buf, count)) == -1 && errno == EINTR);
+ do {
+ ret = write(fd, buf, count);
+ } while(ret == -1 && errno == EINTR);
return(ret);
}