diff options
author | marcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059> | 2005-06-10 11:04:32 +0800 |
---|---|---|
committer | marcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059> | 2005-06-10 11:04:32 +0800 |
commit | dcc907ec1afe7d639eb4f7a834700fbd91c5a181 (patch) | |
tree | e49385b54587e8dd4a920f3d4b4e2402d407dd8e /devel/libgtop2/files/patch-src::daemon::io.c | |
parent | bb544fa6f1f773e3a44a791a4cca87f32a2eff34 (diff) | |
download | marcuscom-ports-dcc907ec1afe7d639eb4f7a834700fbd91c5a181.tar marcuscom-ports-dcc907ec1afe7d639eb4f7a834700fbd91c5a181.tar.gz marcuscom-ports-dcc907ec1afe7d639eb4f7a834700fbd91c5a181.tar.bz2 marcuscom-ports-dcc907ec1afe7d639eb4f7a834700fbd91c5a181.tar.lz marcuscom-ports-dcc907ec1afe7d639eb4f7a834700fbd91c5a181.tar.xz marcuscom-ports-dcc907ec1afe7d639eb4f7a834700fbd91c5a181.tar.zst marcuscom-ports-dcc907ec1afe7d639eb4f7a834700fbd91c5a181.zip |
Update to 2.11.0, and add FreeBSD sysinfo support.
git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@4059 df743ca5-7f9a-e211-a948-0013205c9059
Diffstat (limited to 'devel/libgtop2/files/patch-src::daemon::io.c')
-rw-r--r-- | devel/libgtop2/files/patch-src::daemon::io.c | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/devel/libgtop2/files/patch-src::daemon::io.c b/devel/libgtop2/files/patch-src::daemon::io.c new file mode 100644 index 000000000..a2d234822 --- /dev/null +++ b/devel/libgtop2/files/patch-src::daemon::io.c @@ -0,0 +1,57 @@ +--- src/daemon/io.c.orig Mon Apr 11 03:30:12 2005 ++++ src/daemon/io.c Mon Apr 11 03:33:22 2005 +@@ -21,6 +21,7 @@ + Boston, MA 02111-1307, USA. + */ + ++#include <errno.h> + #include "daemon.h" + #include <glibtop/error.h> + +@@ -36,9 +37,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"); +@@ -49,9 +54,13 @@ + 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"); +@@ -67,6 +76,7 @@ + size_t already_read = 0, remaining = total_size; + + while (already_read < total_size) { ++retry: + if (s) + nread = recv (s, ptr, remaining, 0); + else +@@ -78,6 +88,8 @@ + } + + if (nread <= 0) { ++ if (errno == EINTR) ++ goto retry; + glibtop_warn_io ("recv"); + return 0; + } |