]> git.meshlink.io Git - catta/blobdiff - avahi-daemon/chroot.c
chroot: suppress error messages if the chroot pipe is closed
[catta] / avahi-daemon / chroot.c
index d796a399510703b45f2661262e3cc848e4419d8d..ccd56be090cc6b64d4454a5d8b4f804af7267fc2 100644 (file)
@@ -394,12 +394,14 @@ int avahi_chroot_helper_unlink(const char *fname) {
             return -1;
         }
 
-        if (write(helper_fd, &command, sizeof(command)) < 0) {
+        if (write(helper_fd, &command, sizeof(command)) < 0 &&
+            (errno != EPIPE && errno != ECONNRESET)) {
             avahi_log_error("write() failed: %s\n", strerror(errno));
             return -1;
         }
 
-        if ((r = read(helper_fd, &c, sizeof(c))) < 0) {
+        if ((r = read(helper_fd, &c, sizeof(c))) < 0 &&
+            (errno != EPIPE && errno != ECONNRESET)) {
             avahi_log_error("read() failed: %s\n", r < 0 ? strerror(errno) : "EOF");
             return -1;
         }