diff options
author | marcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059> | 2003-12-02 05:21:15 +0800 |
---|---|---|
committer | marcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059> | 2003-12-02 05:21:15 +0800 |
commit | 9e9792d7663f1e569efe5640903344449b094b43 (patch) | |
tree | d6655e6cf02ea2a3bf144e552009daadddca7aa9 /devel/libgtop2 | |
parent | 7e9943da6c25d64cfebd70c94f6a29d97e33d53b (diff) | |
download | marcuscom-ports-9e9792d7663f1e569efe5640903344449b094b43.tar marcuscom-ports-9e9792d7663f1e569efe5640903344449b094b43.tar.gz marcuscom-ports-9e9792d7663f1e569efe5640903344449b094b43.tar.bz2 marcuscom-ports-9e9792d7663f1e569efe5640903344449b094b43.tar.lz marcuscom-ports-9e9792d7663f1e569efe5640903344449b094b43.tar.xz marcuscom-ports-9e9792d7663f1e569efe5640903344449b094b43.tar.zst marcuscom-ports-9e9792d7663f1e569efe5640903344449b094b43.zip |
Check to see if calls to read() and write() return EAGAIN as well as
EINTR. If they do, continue to poll. While I'm here, fix the problem
where file system types were listed as '?'.
Note, while this gets gnome-system-monitor working on FreeBSD again,
the CPU usage meter is flat-lined at 100% (erroneously). Perhaps some
kind soul (*cough* bland) would give it a look.
git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@1386 df743ca5-7f9a-e211-a948-0013205c9059
Diffstat (limited to 'devel/libgtop2')
-rw-r--r-- | devel/libgtop2/Makefile | 1 | ||||
-rw-r--r-- | devel/libgtop2/files/patch-lib::read.c | 2 | ||||
-rw-r--r-- | devel/libgtop2/files/patch-lib::write.c | 2 | ||||
-rw-r--r-- | devel/libgtop2/files/patch-src::daemon::io.c | 10 | ||||
-rw-r--r-- | devel/libgtop2/files/patch-sysdeps_common_mountlist.c | 20 |
5 files changed, 28 insertions, 7 deletions
diff --git a/devel/libgtop2/Makefile b/devel/libgtop2/Makefile index cc0252027..237bd0def 100644 --- a/devel/libgtop2/Makefile +++ b/devel/libgtop2/Makefile @@ -7,6 +7,7 @@ PORTNAME= libgtop2 PORTVERSION= 2.5.0 +PORTREVISION= 1 CATEGORIES= devel gnome MASTER_SITES= ${MASTER_SITE_GNOME} MASTER_SITE_SUBDIR= sources/${PORTNAME:S/2$//}/2.5 diff --git a/devel/libgtop2/files/patch-lib::read.c b/devel/libgtop2/files/patch-lib::read.c index 38583f876..7457dcbf1 100644 --- a/devel/libgtop2/files/patch-lib::read.c +++ b/devel/libgtop2/files/patch-lib::read.c @@ -21,7 +21,7 @@ - if (ret < 0) + if (ret < 0) { -+ if (errno == EINTR) ++ if (errno == EINTR || errno == EAGAIN) + goto retry; glibtop_error_io_r (server, _("read %d bytes"), size); + } diff --git a/devel/libgtop2/files/patch-lib::write.c b/devel/libgtop2/files/patch-lib::write.c index 45c2434ea..ad879ecb4 100644 --- a/devel/libgtop2/files/patch-lib::write.c +++ b/devel/libgtop2/files/patch-lib::write.c @@ -21,7 +21,7 @@ - if (ret < 0) + if (ret < 0) { -+ if (errno == EINTR) ++ if (errno == EINTR || errno == EAGAIN) + goto retry; glibtop_error_io_r (server, _("write %d bytes"), size); + } diff --git a/devel/libgtop2/files/patch-src::daemon::io.c b/devel/libgtop2/files/patch-src::daemon::io.c index b4079dec1..8ec46eac1 100644 --- a/devel/libgtop2/files/patch-src::daemon::io.c +++ b/devel/libgtop2/files/patch-src::daemon::io.c @@ -1,5 +1,5 @@ ---- src/daemon/io.c.orig Tue Sep 9 09:51:15 2003 -+++ src/daemon/io.c Tue Sep 9 10:07:10 2003 +--- 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. */ @@ -16,7 +16,7 @@ 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) ++ if (errno == EINTR || errno == EAGAIN) + goto retry1; glibtop_warn_io ("write"); + } @@ -32,7 +32,7 @@ if (s == 0) { - if (write (1, data, resp->data_size) < 0) + if (write (1, data, resp->data_size) < 0) { -+ if (errno == EINTR) ++ if (errno == EINTR || errno == EAGAIN) + goto retry2; glibtop_warn_io ("write"); + } @@ -51,7 +51,7 @@ } if (nread <= 0) { -+ if (errno == EINTR) ++ if (errno == EINTR || errno == EAGAIN) + goto retry; glibtop_warn_io ("recv"); return 0; diff --git a/devel/libgtop2/files/patch-sysdeps_common_mountlist.c b/devel/libgtop2/files/patch-sysdeps_common_mountlist.c new file mode 100644 index 000000000..62269380b --- /dev/null +++ b/devel/libgtop2/files/patch-sysdeps_common_mountlist.c @@ -0,0 +1,20 @@ +--- sysdeps/common/mountlist.c.orig Mon Dec 1 13:59:28 2003 ++++ sysdeps/common/mountlist.c Mon Dec 1 16:13:15 2003 +@@ -127,7 +127,7 @@ + } + #endif /* MOUNTED_GETMNTENT1. */ + +-#if defined (MOUNTED_GETMNTINFO) && !defined (__NetBSD__) && !defined (__OpenBSD__) ++#if defined (MOUNTED_GETMNTINFO) && !defined (__NetBSD__) && !defined (__OpenBSD__) && !defined(__FreeBSD__) + static char * + fstype_to_string (t) + short t; +@@ -345,7 +345,7 @@ + me = (struct mount_entry *) g_malloc (sizeof (struct mount_entry)); + me->me_devname = g_strdup (fsp->f_mntfromname); + me->me_mountdir = g_strdup (fsp->f_mntonname); +-#if defined(__NetBSD__) || defined(__OpenBSD__) ++#if defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__) + me->me_type = g_strdup (fsp->f_fstypename); + #else + me->me_type = g_strdup (fstype_to_string (fsp->f_type)); |