$NetBSD: patch-bb,v 1.2 2006/08/06 19:06:44 jmmv Exp $ From FreeBSD's GNOME development repository. --- lib/write.c.orig 2006-04-10 10:41:46.000000000 +0200 +++ lib/write.c @@ -22,6 +22,7 @@ */ #include +#include #include #include @@ -42,15 +43,19 @@ glibtop_write_l (glibtop *server, size_t fprintf (stderr, "LIBRARY: really writing %d bytes.\n", (int)size); #endif +retry: if (server->socket) { ret = send (server->socket, buf, size, 0); } else { ret = write (server->output [1], buf, size); } - if (ret < 0) + if (ret < 0) { + if (errno == EINTR) + goto retry; glibtop_error_io_r (server, ngettext("wrote %d byte", "wrote %d bytes", size), (int) size); + } }