[kaffe] CVS kaffe (guilhem): Fix for jthreadedRecvFrom.

Kaffe CVS cvs-commits at kaffe.org
Sat Nov 26 13:35:10 PST 2005


PatchSet 6973 
Date: 2005/11/26 21:28:10
Author: guilhem
Branch: HEAD
Tag: (none) 
Log:
Fix for jthreadedRecvFrom.

        * kaffe/kaffevm/systems/unix-pthreads/syscalls.c
        (jthreadedRecvFrom): Fixed infinite loop.

Members: 
	ChangeLog:1.4495->1.4496 
	kaffe/kaffevm/systems/unix-pthreads/syscalls.c:1.34->1.35 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.4495 kaffe/ChangeLog:1.4496
--- kaffe/ChangeLog:1.4495	Sat Nov 26 20:29:32 2005
+++ kaffe/ChangeLog	Sat Nov 26 21:28:10 2005
@@ -1,5 +1,10 @@
 2005-11-26  Guilhem Lavaux  <guilhem at kaffe.org>
 
+	* kaffe/kaffevm/systems/unix-pthreads/syscalls.c
+	(jthreadedRecvFrom): Fixed infinite loop.
+
+2005-11-26  Guilhem Lavaux  <guilhem at kaffe.org>
+
 	* Resynchronized GNU Classpath to 2005-11-26.
 
 	* developers/resync-classpath.sh: Partially automated the update of the
Index: kaffe/kaffe/kaffevm/systems/unix-pthreads/syscalls.c
diff -u kaffe/kaffe/kaffevm/systems/unix-pthreads/syscalls.c:1.34 kaffe/kaffe/kaffevm/systems/unix-pthreads/syscalls.c:1.35
--- kaffe/kaffe/kaffevm/systems/unix-pthreads/syscalls.c:1.34	Fri Nov 25 21:01:53 2005
+++ kaffe/kaffe/kaffevm/systems/unix-pthreads/syscalls.c	Sat Nov 26 21:28:14 2005
@@ -94,7 +94,7 @@
   
   FD_ZERO(&rset);
   FD_SET(fd,&rset);
-  
+
   return selectHelper(fd+1, &rset, NULL, NULL, timeout);
 }
 
@@ -613,6 +613,10 @@
 		BREAK_IF_LATE(deadline, timeout)
 
 		r = recvfrom(fd, buf, len, flags, from, fromlen);
+		if (r >= 0 || !(errno == EWOULDBLOCK || errno == EINTR
+			|| errno == EAGAIN)) {
+			break;
+		}
 	}
 	jthread_set_blocking(fd, blocking);
 	SET_RETURN_OUT(r, out, r)



More information about the kaffe mailing list