Code

Fixed collectd's unixsock read interrupted by SIGCHLD's.
authorGerrie Roos <groos@xiplink.com>
Tue, 17 Apr 2012 13:22:36 +0000 (15:22 +0200)
committerFlorian Forster <octo@collectd.org>
Tue, 11 Sep 2012 07:06:37 +0000 (09:06 +0200)
Signed-off-by: Florian Forster <octo@collectd.org>
src/unixsock.c

index 344424715e6e0cc23c938c38a17b280686a19168..35c77121eb5c792d8f97787cb6503b9f753cf3d5 100644 (file)
@@ -225,6 +225,9 @@ static void *us_handle_client (void *arg)
                errno = 0;
                if (fgets (buffer, sizeof (buffer), fhin) == NULL)
                {
+                       if ((errno == EINTR) || (errno == EAGAIN))
+                               continue;
+
                        if (errno != 0)
                        {
                                char errbuf[1024];