]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix #752: retry resource temporarily unavailable on control pipe.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Thu, 2 Jun 2016 09:34:43 +0000 (09:34 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Thu, 2 Jun 2016 09:34:43 +0000 (09:34 +0000)
git-svn-id: file:///svn/unbound/trunk@3746 be551aaa-1e26-0410-a405-d3ace91eadb9

doc/Changelog
util/tube.c

index 5b524539b6d80ffc92c02f520faac58e4a82838f..5676473e6f22e7684f19ed1368d69e7529e792ee 100644 (file)
@@ -1,6 +1,7 @@
 2 June 2016: Wouter
        - Fix libubound for edns optlist feature.
        - Fix distinction between free and CRYPTO_free in dsa and ecdsa alloc.
+       - Fix #752: retry resource temporarily unavailable on control pipe.
 
 31 May 2016: Wouter
        - Fix windows service to be created run with limited rights, as a
index e415427c53f4652a3c31ec5b718b76e315e77826..e525f1ccd8aaa35f9d81d389aecdb7381092da95 100644 (file)
@@ -304,6 +304,8 @@ int tube_write_msg(struct tube* tube, uint8_t* buf, uint32_t len,
        d = r;
        while(d != (ssize_t)sizeof(len)) {
                if((r=write(fd, ((char*)&len)+d, sizeof(len)-d)) == -1) {
+                       if(errno == EAGAIN)
+                               continue; /* temporarily unavail: try again*/
                        log_err("tube msg write failed: %s", strerror(errno));
                        (void)fd_set_nonblock(fd);
                        return 0;
@@ -313,6 +315,8 @@ int tube_write_msg(struct tube* tube, uint8_t* buf, uint32_t len,
        d = 0;
        while(d != (ssize_t)len) {
                if((r=write(fd, buf+d, len-d)) == -1) {
+                       if(errno == EAGAIN)
+                               continue; /* temporarily unavail: try again*/
                        log_err("tube msg write failed: %s", strerror(errno));
                        (void)fd_set_nonblock(fd);
                        return 0;