summaryrefslogtreecommitdiffstats
path: root/devel/libgtop2/files/patch-lib::read.c
blob: 38583f8766a9ec94bdf7e91a51df2d72b3a1fb2c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
--- lib/read.c.orig Mon Oct 20 11:19:41 2003
+++ lib/read.c  Fri Nov 14 14:37:00 2003
@@ -22,6 +22,7 @@
 */
 
 #include <config.h>
+#include <errno.h>
 #include <glibtop/read.h>
 #include <libgnome/gnome-i18n.h>
 
@@ -68,12 +69,16 @@
    fprintf (stderr, "LIBRARY: really reading %d bytes.\n", size);
 #endif
 
+retry:
    if (server->socket) {
        do_read (server->socket, buf, size);
    } else {
        ret = read (server->input [0], buf, size);
    }
 
-   if (ret < 0)
+   if (ret < 0) {
+       if (errno == EINTR)
+           goto retry;
        glibtop_error_io_r (server, _("read %d bytes"), size);
+   }
 }