openbsd-ports/devel/libgtop2/patches/patch-lib_write_c
marcm ca3b5569fc Update to 2.6.0. Get rid of the custom OpenBSD support from the
former nino@ that has been a part of this port for some time.
Updates to the internal API finally broke it, but a huge thanks
to Nils for his work there (thanks Nils!).

Now we use the Free/NetBSD support as a base and patch from there :).
2004-08-01 06:06:35 +00:00

30 lines
720 B
Plaintext

$OpenBSD: patch-lib_write_c,v 1.1 2004/08/01 06:06:35 marcm Exp $
--- lib/write.c.orig Thu Mar 4 07:29:12 2004
+++ lib/write.c Sat Jul 31 13:01:28 2004
@@ -23,6 +23,7 @@
#include <config.h>
+#include <errno.h>
#include <glibtop/write.h>
#include "libgtop-i18n.h"
@@ -41,12 +42,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 ("write %d byte", "write %d bytes", size), size);
+ }
}