[Webkit-unassigned] [Bug 61287] [UNIX] Don't use SOCK_DGRAM in socketpair()

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed May 25 22:49:10 PDT 2011


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


Simon Hausmann <hausmann at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hausmann at webkit.org,
                   |                            |kimmo.t.kinnunen at nokia.com




--- Comment #10 from Simon Hausmann <hausmann at webkit.org>  2011-05-25 22:49:10 PST ---
(In reply to comment #0)
> 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.

I think we should also consult Kimmo about this, since he converted ConnectionQt.cpp to use DGRAM sockets.

-- 
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