1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-12 03:00:28 +00:00
freebsd-ports/devel/libgtop2/files/patch-src::daemon::io.c
Joe Marcus Clarke c4851e78e4 Presenting GNOME 2.6.0. The FreeBSD GNOME Team feels this our best release
ever.  It fixes many bugs, and adds some features missing in previous
FreeBSD ports.  To help users upgrade from GNOME 2.4, we have constructed an
upgrade FAQ at:

http://www.freebsd.org/gnome/docs/faq26.html

Please read it carefully.  GNOME 2.6 packages are also available for all
supported i386 versions of FreeBSD at:

http://www.marcuscom.com/tinderbox/

The FreeBSD GNOME Team would like the thank the following users for their
wonderful testing and patching efforts.  We would especially like to thank
Franz Klammer <klammer@webonaut.com> for his wonderful new splash screen.
Without these people, our team, and our team alumni, GNOME on FreeBSD would
not be possible.

Jeremy Messenger <mezz7@cox.net>
Khairil Yusof <kaeru@pd.jaring.my>
Koop Mast <kwm@rainbow-runner.nl>
Simon Barner <barner@in.tum.de>
Tom McLaughlin <tmclaugh@sdf.lonestar.org>
Scott Dodson <sdodson@sdodson.com>
Vladimir Grebenschikov <vova@sw.ru>
2004-04-05 03:11:39 +00:00

59 lines
1.3 KiB
C

--- src/daemon/io.c.orig Sun Oct 19 12:54:32 2003
+++ src/daemon/io.c Mon Dec 1 13:50:25 2003
@@ -21,6 +21,7 @@
Boston, MA 02111-1307, USA.
*/
+#include <errno.h>
#include "daemon.h"
void
@@ -35,9 +36,13 @@
resp->offset = offset;
resp->data_size = data_size;
+retry1:
if (s == 0) {
- if (write (1, (const void *) resp, sizeof (glibtop_response)) < 0)
+ if (write (1, (const void *) resp, sizeof (glibtop_response)) < 0) {
+ if (errno == EINTR)
+ goto retry1;
glibtop_warn_io ("write");
+ }
} else {
if (send (s, (const void *) resp, sizeof (glibtop_response), 0) < 0)
glibtop_warn_io ("send");
@@ -47,10 +52,13 @@
#ifdef REAL_DEBUG
fprintf (stderr, "Writing %d bytes of data.\n", resp->data_size);
#endif
-
+retry2:
if (s == 0) {
- if (write (1, data, resp->data_size) < 0)
+ if (write (1, data, resp->data_size) < 0) {
+ if (errno == EINTR)
+ goto retry2;
glibtop_warn_io ("write");
+ }
} else {
if (send (s, data, resp->data_size, 0) , 0)
glibtop_warn_io ("send");
@@ -66,6 +74,7 @@
size_t already_read = 0, remaining = total_size;
while (already_read < total_size) {
+retry:
if (s)
nread = recv (s, ptr, remaining, 0);
else
@@ -77,6 +86,8 @@
}
if (nread <= 0) {
+ if (errno == EINTR)
+ goto retry;
glibtop_warn_io ("recv");
return 0;
}