[kaffe] CVS kaffe (dalibor): Poll for POLLHUP, too

Kaffe CVS cvs-commits at kaffe.org
Mon Mar 15 06:24:02 PST 2004


PatchSet 4519 
Date: 2004/03/15 14:19:43
Author: dalibor
Branch: HEAD
Tag: (none) 
Log:
Poll for POLLHUP, too

2004-03-15  Dalibor Topic <robilad at kaffe.org>

        * kaffe/kaffevm/systems/unix-jthreads/jthread.c:
        Poll for POLLHUP, too, since some systems only set
        PULLHUP on EOF.

Members: 
	ChangeLog:1.2097->1.2098 
	kaffe/kaffevm/systems/unix-jthreads/jthread.c:1.108->1.109 
	libltdl/config-h.in:1.13->1.14 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.2097 kaffe/ChangeLog:1.2098
--- kaffe/ChangeLog:1.2097	Sat Mar 13 17:41:56 2004
+++ kaffe/ChangeLog	Mon Mar 15 14:19:43 2004
@@ -1,3 +1,9 @@
+2004-03-15  Dalibor Topic <robilad at kaffe.org>
+
+	* kaffe/kaffevm/systems/unix-jthreads/jthread.c:
+	Poll for POLLHUP, too, since some systems only set
+	PULLHUP on EOF.
+
 2004-03-13  Dalibor Topic <robilad at kaffe.org>
 
 	* config/m68k/jit.h:
Index: kaffe/kaffe/kaffevm/systems/unix-jthreads/jthread.c
diff -u kaffe/kaffe/kaffevm/systems/unix-jthreads/jthread.c:1.108 kaffe/kaffe/kaffevm/systems/unix-jthreads/jthread.c:1.109
--- kaffe/kaffe/kaffevm/systems/unix-jthreads/jthread.c:1.108	Thu Mar 11 16:00:08 2004
+++ kaffe/kaffe/kaffevm/systems/unix-jthreads/jthread.c	Mon Mar 15 14:19:44 2004
@@ -2109,7 +2109,11 @@
 	for (nfd = 0, i = 0; i <= maxFd; i++) {
 		short ev = 0;
 		if (readQ[i] != 0) { 	/* FD_ISSET(i, &readsPending) */
-			ev |= POLLIN;
+			/* Check for POLLIN and POLLHUP for portability.
+			 * Some poll(2) implementations return POLLHUP
+			 * on EOF.
+			 */
+			ev |= POLLIN | POLLHUP;
 		}
 		if (writeQ[i] != 0) {   /* FD_ISSET(i, &writesPending) */
 			ev |= POLLOUT;
Index: kaffe/libltdl/config-h.in
diff -u kaffe/libltdl/config-h.in:1.13 kaffe/libltdl/config-h.in:1.14
--- kaffe/libltdl/config-h.in:1.13	Tue Jan 27 11:08:43 2004
+++ kaffe/libltdl/config-h.in	Mon Mar 15 14:19:45 2004
@@ -3,9 +3,6 @@
 /* Define to 1 if you have the `argz_append' function. */
 #undef HAVE_ARGZ_APPEND
 
-/* Define to 1 if you have the `argz_create_sep' function. */
-#undef HAVE_ARGZ_CREATE_SEP
-
 /* Define to 1 if you have the <argz.h> header file. */
 #undef HAVE_ARGZ_H
 




More information about the kaffe mailing list