harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r761237 - /harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/OSNetworkSystemLinux.c
Date Thu, 02 Apr 2009 10:25:52 GMT
Author: tellison
Date: Thu Apr  2 10:25:52 2009
New Revision: 761237

URL: http://svn.apache.org/viewvc?rev=761237&view=rev
Log:
Ensure that interruptions in the poll call do not cause early return of the socket read,
especially since the signal may be a GC interrupt.

Modified:
    harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/OSNetworkSystemLinux.c

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/OSNetworkSystemLinux.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/OSNetworkSystemLinux.c?rev=761237&r1=761236&r2=761237&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/OSNetworkSystemLinux.c
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/OSNetworkSystemLinux.c
Thu Apr  2 10:25:52 2009
@@ -71,7 +71,9 @@
   my_pollfd.fd = hysocketP->sock;
   my_pollfd.events = POLLIN | POLLPRI;
   my_pollfd.revents = 0;
-  result = poll (&my_pollfd, 1, timeout);
+  do {
+    result = poll (&my_pollfd, 1, timeout);
+  } while (result == -1 && errno == EINTR);
   
   if (result == 0)
     return HYPORT_ERROR_SOCKET_TIMEOUT;



Mime
View raw message