Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[EFL] NetworkStateNotifierEfl: Use closeWithRetry instead of looping …
…for EINTR on close

https://bugs.webkit.org/show_bug.cgi?id=117872

Patch by Sergio Correia <sergio.correia@openbossa.org> 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.

Canonical link: https://commits.webkit.org/136010@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@151834 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
qrwteyrutiyoup authored and webkit-commit-queue committed Jun 21, 2013
1 parent 0c91679 commit 0b2384f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 7 deletions.
16 changes: 16 additions & 0 deletions Source/WebCore/ChangeLog
@@ -1,3 +1,19 @@
2013-06-21 Sergio Correia <sergio.correia@openbossa.org>

[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 <ch.dumez@sisa.samsung.com>

REGRESSION (r150663): Using webkitAudioContext in Inspector makes it undefined everywhere
Expand Down
10 changes: 3 additions & 7 deletions Source/WebCore/platform/network/efl/NetworkStateNotifierEfl.cpp
Expand Up @@ -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>
Expand Down Expand Up @@ -149,12 +149,8 @@ NetworkStateNotifier::~NetworkStateNotifier()
{
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();
}

Expand Down

0 comments on commit 0b2384f

Please sign in to comment.