summaryrefslogtreecommitdiff
path: root/net/kdenetwork3/patches/patch-am
diff options
context:
space:
mode:
Diffstat (limited to 'net/kdenetwork3/patches/patch-am')
-rw-r--r--net/kdenetwork3/patches/patch-am77
1 files changed, 12 insertions, 65 deletions
diff --git a/net/kdenetwork3/patches/patch-am b/net/kdenetwork3/patches/patch-am
index cda6a53f401..4a7522119cc 100644
--- a/net/kdenetwork3/patches/patch-am
+++ b/net/kdenetwork3/patches/patch-am
@@ -1,66 +1,13 @@
-$NetBSD: patch-am,v 1.1.1.1 2002/05/31 13:59:29 skrll Exp $
+$NetBSD: patch-am,v 1.2 2003/03/11 13:13:29 markd Exp $
---- libkdenetwork/kpgpbase.cpp.orig Sun Jan 20 20:23:35 2002
-+++ libkdenetwork/kpgpbase.cpp
-@@ -264,9 +264,28 @@
- //kdDebug(5100) << "Read " << len << " bytes from pout[0]" << endl;
- str[len] ='\0';
- output += str;
-- }
-- else
-+ } else {
-+ /*
-+ * Apparently, on NetBSD when the child dies, the pipe begins
-+ * receiving empty data packets *before* waitpid() has signaled
-+ * that the child has died. Also, notice that this happens
-+ * without any error bit being set in pollfd.revents (is this a
-+ * NetBSD bug???). Notice that these anomalous packets exist
-+ * according to poll(), but have length 0 according to read().
-+ * Thus, kde can remain stuck inside this loop.
-+ *
-+ * A solution to this problem is to get out of the inner loop
-+ * when read() returns <=0. In this way, kde has another chance
-+ * to call waitpid() to check if the child has died -- and this
-+ * time the call should succeed.
-+ *
-+ * Setting POLLHUP in pollfd.revents is not necessary, but I just
-+ * like the idea of signaling that something strange has
-+ * happened.
-+ */
-+ pollout.revents |= POLLHUP;
- break;
-+ }
- }
- }
- else if (pollstatus == -1) {
-@@ -289,9 +308,28 @@
- //kdDebug(5100) << "Read " << len << " bytes from perr[0]" << endl;
- str[len] ='\0';
- error += str;
-- }
-- else
-+ } else {
-+ /*
-+ * Apparently, on NetBSD when the child dies, the pipe begins
-+ * receiving empty data packets *before* waitpid() has signaled
-+ * that the child has died. Also, notice that this happens
-+ * without any error bit being set in pollfd.revents (is this a
-+ * NetBSD bug???). Notice that these anomalous packets exist
-+ * according to poll(), but have length 0 according to read().
-+ * Thus, kde can remain stuck inside this loop.
-+ *
-+ * A solution to this problem is to get out of the inner loop
-+ * when read() returns <=0. In this way, kde has another chance
-+ * to call waitpid() to check if the child has died -- and this
-+ * time the call should succeed.
-+ *
-+ * Setting POLLHUP in pollfd.revents is not necessary, but I just
-+ * like the idea of signaling that something strange has
-+ * happened.
-+ */
-+ pollerr.revents |= POLLHUP;
- break;
-+ }
- }
- }
- else if (pollstatus == -1) {
+--- krfb/srvloc/kinetaddr.h.orig Mon Aug 12 23:26:39 2002
++++ krfb/srvloc/kinetaddr.h
+@@ -29,7 +29,7 @@
+
+ #include <arpa/inet.h>
+
+-#if defined(__FreeBSD__)
++#if defined(__FreeBSD__) || defined(__NetBSD__)
+ #include <sys/socket.h>
+ #endif
+