diff options
author | marcus <marcus@FreeBSD.org> | 2004-12-28 02:42:23 +0000 |
---|---|---|
committer | marcus <marcus@FreeBSD.org> | 2004-12-28 02:42:23 +0000 |
commit | a74f7962f991cf71e5408a0cb2b04ac6434ab14f (patch) | |
tree | 574ae4f7dd394fee8c85be987fa3ccf963782eac /net | |
parent | 0b3c017a18ac98c0deef13e5f8dda868bb3809d6 (diff) | |
download | FreeBSD-ports-a74f7962f991cf71e5408a0cb2b04ac6434ab14f.zip FreeBSD-ports-a74f7962f991cf71e5408a0cb2b04ac6434ab14f.tar.gz |
FreeBSD sets POLLIN along with POLLHUP when a pipe is reaches EOF. Account
for this to avoid an infinite loop when running the embedded network
commands.
Diffstat (limited to 'net')
-rw-r--r-- | net/gnome-nettool/Makefile | 1 | ||||
-rw-r--r-- | net/gnome-nettool/files/patch-src_nettool.c | 33 | ||||
-rw-r--r-- | net/gnomenettool/Makefile | 1 | ||||
-rw-r--r-- | net/gnomenettool/files/patch-src_nettool.c | 33 |
4 files changed, 64 insertions, 4 deletions
diff --git a/net/gnome-nettool/Makefile b/net/gnome-nettool/Makefile index 9d79224..fd1c348 100644 --- a/net/gnome-nettool/Makefile +++ b/net/gnome-nettool/Makefile @@ -7,6 +7,7 @@ PORTNAME= gnomenettool PORTVERSION= 1.0.0 +PORTREVISION= 1 PORTEPOCH= 1 CATEGORIES= net gnome MASTER_SITES= ${MASTER_SITE_GNOME} diff --git a/net/gnome-nettool/files/patch-src_nettool.c b/net/gnome-nettool/files/patch-src_nettool.c index 3319e36..51f11e3 100644 --- a/net/gnome-nettool/files/patch-src_nettool.c +++ b/net/gnome-nettool/files/patch-src_nettool.c @@ -1,5 +1,5 @@ ---- src/nettool.c.orig Sun Jul 4 15:52:03 2004 -+++ src/nettool.c Sun Jul 4 15:53:11 2004 +--- src/nettool.c.orig Wed Dec 22 07:07:36 2004 ++++ src/nettool.c Mon Dec 27 21:22:28 2004 @@ -21,6 +21,7 @@ #include <gnome.h> #include <sys/types.h> @@ -8,3 +8,32 @@ #include <signal.h> #include <errno.h> #include <sys/wait.h> +@@ -361,6 +362,10 @@ + len, NULL); + } + ++ g_free (text); ++ ++ return TRUE; ++ + } else if (status == G_IO_STATUS_AGAIN) { + char buf[1]; + +@@ -372,12 +377,14 @@ + } + g_string_append_c (netinfo->command_output, buf[0]); + } ++ ++ g_free (text); ++ ++ return TRUE; + } else if (status == G_IO_STATUS_EOF) { +- } ++ } + + g_free (text); +- +- return TRUE; + } + + /* The condition is not G_IO_HUP | G_IO_ERR | G_IO_NVAL, so diff --git a/net/gnomenettool/Makefile b/net/gnomenettool/Makefile index 9d79224..fd1c348 100644 --- a/net/gnomenettool/Makefile +++ b/net/gnomenettool/Makefile @@ -7,6 +7,7 @@ PORTNAME= gnomenettool PORTVERSION= 1.0.0 +PORTREVISION= 1 PORTEPOCH= 1 CATEGORIES= net gnome MASTER_SITES= ${MASTER_SITE_GNOME} diff --git a/net/gnomenettool/files/patch-src_nettool.c b/net/gnomenettool/files/patch-src_nettool.c index 3319e36..51f11e3 100644 --- a/net/gnomenettool/files/patch-src_nettool.c +++ b/net/gnomenettool/files/patch-src_nettool.c @@ -1,5 +1,5 @@ ---- src/nettool.c.orig Sun Jul 4 15:52:03 2004 -+++ src/nettool.c Sun Jul 4 15:53:11 2004 +--- src/nettool.c.orig Wed Dec 22 07:07:36 2004 ++++ src/nettool.c Mon Dec 27 21:22:28 2004 @@ -21,6 +21,7 @@ #include <gnome.h> #include <sys/types.h> @@ -8,3 +8,32 @@ #include <signal.h> #include <errno.h> #include <sys/wait.h> +@@ -361,6 +362,10 @@ + len, NULL); + } + ++ g_free (text); ++ ++ return TRUE; ++ + } else if (status == G_IO_STATUS_AGAIN) { + char buf[1]; + +@@ -372,12 +377,14 @@ + } + g_string_append_c (netinfo->command_output, buf[0]); + } ++ ++ g_free (text); ++ ++ return TRUE; + } else if (status == G_IO_STATUS_EOF) { +- } ++ } + + g_free (text); +- +- return TRUE; + } + + /* The condition is not G_IO_HUP | G_IO_ERR | G_IO_NVAL, so |