$OpenBSD: patch-lib_write_c,v 1.2 2005/05/25 23:28:16 marcm Exp $ --- lib/write.c.orig Tue Feb 15 04:48:33 2005 +++ lib/write.c Mon Apr 11 19:56:33 2005 @@ -23,6 +23,7 @@ #include +#include #include #include #include "libgtop-i18n.h" @@ -42,12 +43,16 @@ glibtop_write_l (glibtop *server, size_t fprintf (stderr, "LIBRARY: really writing %d bytes.\n", 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), size); + } }