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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu May 26 05:07:11 PDT 2011


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





--- Comment #23 from Kimmo Kinnunen <kimmo.t.kinnunen at nokia.com>  2011-05-26 05:07:11 PST ---
(In reply to comment #22)
> (In reply to comment #21)
> > Quickly glancing to the diff I would say your patch doesn't take this into account, but again, sorry if I'm wrong.
> 
> Yes, it handles it for both the bytes read and the file descriptors received using a single buffer in both cases.

Ok, good. sorry.

> > (In reply to comment #20)
> > > When you say the message is buffered redundantly, what do you mean? 
> > 
> > I mean, SOCK_STREAM sockets are buffered. The socket API doesn't say when and what amount of data is sent.
> 
> Yes, note that STREAM socket would only be used if SOCK_SEQPACKET is not available.

First you say STREAM is not used..

> You could also read more than one message with a single recvmsg() reducing the amount of syscalls. 

..then you argument justification of the complexity due to a STREAM feature? 

Look, I gotta stop right now wasting your and my own time. I'm not a reviewer, I don't have much to say about this issue and you don't need to listen to my argumentation. Certainly this is even more the case with Gtk port.

To conclude my stand here: You are solving the problem of notifying of closing the connection. I don't think implementing entirely correct, arbitrary stream protocol parsing is the way to do it. The IPC is designed as a datagram protocol. Requiring 100% correct stream protocol implementation is insanity.

I could think of few other, far simpler implementations for close notifications. One is the socket thing, which solves the crash problem too. "The orderly shutdown" scenario can be solved by also sending a simple message. For example, you can send datagram "KIMMO" to signify close, and that will work.

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