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 3444247..35c7712 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];