put poll() calls in loops in case they are interrupted by signals
[ust.git] / libust / tracectl.c
index 277dbcd75d773f31f9c19f1056d49715d7dfabde..5ccd1f5eba14b0846223f297ea78408c9af37fa0 100644 (file)
@@ -1,3 +1,20 @@
+/* Copyright (C) 2009  Pierre-Marc Fournier
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
+ */
+
 #define _GNU_SOURCE
 #include <stdio.h>
 #include <stdint.h>
@@ -147,7 +164,8 @@ void process_blocked_consumers(void)
                idx++;
        }
 
-       result = poll(fds, n_fds, 0);
+       while((result = poll(fds, n_fds, 0)) == -1 && errno == EINTR)
+               /* nothing */;
        if(result == -1) {
                PERROR("poll");
                return;
This page took 0.022951 seconds and 4 git commands to generate.