debian/rules: Use `git' potty wrapper.
[qmail] / slurpclose.c
index 27be0ea..2fcef15 100644 (file)
@@ -1,6 +1,7 @@
 #include "stralloc.h"
 #include "readwrite.h"
 #include "slurpclose.h"
+#include "error.h"
 
 int slurpclose(fd,sa,bufsize)
 int fd;
@@ -11,6 +12,7 @@ int bufsize;
   for (;;) {
     if (!stralloc_readyplus(sa,bufsize)) { close(fd); return -1; }
     r = read(fd,sa->s + sa->len,bufsize);
+    if (r == -1) if (errno == error_intr) continue;
     if (r <= 0) { close(fd); return r; }
     sa->len += r;
   }