Title: [151834] trunk/Source/WebCore
Revision
151834
Author
[email protected]
Date
2013-06-21 06:59:19 -0700 (Fri, 21 Jun 2013)

Log Message

[EFL] NetworkStateNotifierEfl: Use closeWithRetry instead of looping for EINTR on close
https://bugs.webkit.org/show_bug.cgi?id=117872

Patch by Sergio Correia <[email protected]> on 2013-06-21
Reviewed by Christophe Dumez.

closeWithRetry works around the Linux behavior of closing the file descriptor
unconditionally even if the close() call is interrupted.

No new tests, no behavior change.

* platform/network/efl/NetworkStateNotifierEfl.cpp:
(WebCore::NetworkStateNotifier::~NetworkStateNotifier): Use closeWithRetry instead of
looping for EINTR on close.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (151833 => 151834)


--- trunk/Source/WebCore/ChangeLog	2013-06-21 11:41:39 UTC (rev 151833)
+++ trunk/Source/WebCore/ChangeLog	2013-06-21 13:59:19 UTC (rev 151834)
@@ -1,3 +1,19 @@
+2013-06-21  Sergio Correia  <[email protected]>
+
+        [EFL] NetworkStateNotifierEfl: Use closeWithRetry instead of looping for EINTR on close
+        https://bugs.webkit.org/show_bug.cgi?id=117872
+
+        Reviewed by Christophe Dumez.
+
+        closeWithRetry works around the Linux behavior of closing the file descriptor
+        unconditionally even if the close() call is interrupted.
+
+        No new tests, no behavior change.
+
+        * platform/network/efl/NetworkStateNotifierEfl.cpp:
+        (WebCore::NetworkStateNotifier::~NetworkStateNotifier): Use closeWithRetry instead of
+        looping for EINTR on close.
+
 2013-06-21  Christophe Dumez  <[email protected]>
 
         REGRESSION (r150663): Using webkitAudioContext in Inspector makes it undefined everywhere

Modified: trunk/Source/WebCore/platform/network/efl/NetworkStateNotifierEfl.cpp (151833 => 151834)


--- trunk/Source/WebCore/platform/network/efl/NetworkStateNotifierEfl.cpp	2013-06-21 11:41:39 UTC (rev 151833)
+++ trunk/Source/WebCore/platform/network/efl/NetworkStateNotifierEfl.cpp	2013-06-21 13:59:19 UTC (rev 151834)
@@ -34,7 +34,7 @@
 #include <asm/types.h>
 #include <string.h>
 #include <sys/socket.h>
-#include <unistd.h>
+#include <wtf/UniStdExtras.h>
 
 // Must come at the end so that sys/socket.h is included first.
 #include <linux/netlink.h>
@@ -149,12 +149,8 @@
 {
     if (m_fdHandler)
         ecore_main_fd_handler_del(m_fdHandler);
-    if (m_netlinkSocket != -1) {
-        int rv = 0;
-        do {
-            rv = close(m_netlinkSocket);
-        } while (rv == -1 && errno == EINTR);
-    }
+    if (m_netlinkSocket != -1)
+        closeWithRetry(m_netlinkSocket);
     eeze_shutdown();
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to