You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by te...@apache.org on 2009/04/02 12:25:52 UTC

svn commit: r761237 - /harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/OSNetworkSystemLinux.c

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;