[Webkit-unassigned] [Bug 61287] New: [UNIX] Don't use SOCK_DGRAM in socketpair()
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon May 23 08:12:10 PDT 2011
https://bugs.webkit.org/show_bug.cgi?id=61287
Summary: [UNIX] Don't use SOCK_DGRAM in socketpair()
Product: WebKit
Version: 528+ (Nightly build)
Platform: PC
OS/Version: Linux
Status: NEW
Keywords: Gtk, Qt
Severity: Normal
Priority: P2
Component: WebKit2
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: cgarcia at igalia.com
CC: andersca at apple.com, kbalazs at webkit.org
While implemeting the plugin process for the GTK port I noticed that when closing a page containing a plugin, the web process got blocked waiting for a sync message reply which was never sent because the plugin process was about to die. Since DGRAM sockets are not connection-oriented, when one end closes the connection the other end is not notifed. With STREAM sockets a 0-byte read happens when the other end closes the connection. So, the trivial fix would be just using STREAM instead of DGRAM, but in that case, sendmsg/recvmsg behaves a bit differently, there's not 1 to 1 relationship between sendmsg and recvmsg calls, we need to handle the message boundaries in the receiver. In Linux there's SOCK_SEQPACKET that does exactly what we want, it uses the same STREAM function but message boundaries in incoming datagrams are preserved, but it's Linux specific.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list