[Webkit-unassigned] [Bug 95553] New: [Qt] QNX does not support SOCK_SEQPACKET socket type for socketpair in ProcessLauncherQt

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Aug 31 04:12:14 PDT 2012


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

           Summary: [Qt] QNX does not support SOCK_SEQPACKET socket type
                    for socketpair in ProcessLauncherQt
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebKit Qt
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: milian.wolff at kdab.com
            Blocks: 95466


Running a WebKit2/QML app on QNX shows this debug output:

Creation of socket failed with errno: 241

This is from ProcessLauncherQt.cpp, where we currently have:

#if defined(SOCK_SEQPACKET) && !defined(Q_OS_MACX)
#define SOCKET_TYPE SOCK_SEQPACKET
#else
#define SOCKET_TYPE SOCK_DGRAM
#endif

Thus on QNX the SOCK_SEQPACKET socket type is passed to socketpair futher below. On QNX this is apparently not supported, as can be reproduced with this minimal test case:

#include <sys/socket.h>
#include <stdio.h>

int main(int argc, char** argv)
{
    int fds[2];
    char c;

    if (socketpair(AF_UNIX, SOCK_SEQPACKET, 0, fds) == -1) {
        perror("socketpair");
        return 1;
    }

    if (send(fds[0], "a", 1, 0) == -1) {
        perror("send");
        return 1;
    }

    if (recv(fds[1], &c, 1, 0) == -1) {
        perror("recv");
        return 1;
    }

    printf("%c\n", c);

    return 0;
}

The output on a Playbook (bbndk 2.0.1) is: socketpair: Protocol wrong type for socket

Changing SOCK_SEQPACKET to SOCK_DGRAM in the example makes it work, i.e. the output will be "a".

Thus I propose to use SOCK_DGRAM in ProcessLauncherQt.cpp as well, I'll publish a patch.

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