Opened 23 months ago

Last modified 16 months ago

#18204 closed bug

Datagram UNIX sockets are not supported — at Initial Version

Reported by: X512 Owned by: nobody
Priority: normal Milestone: R1/beta5
Component: System/POSIX Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

This is hrev56688.

Datagram (SOCK_DGRAM) UNIX sockets (AF_UNIX) are currently not supported. Only stream (SOCK_STREAM) UNIX sockets are currently working. The difference between datagram and stream UNIX sockets are that datagram sockets preserve packet boundaries but stream sockets don't.

Many software based on socket IPC (example: WebKit POSIX backend) require datagram sockets and don't work correctly with stream sockets.

Test code:

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

int main()
{
	int fd1 = socket(AF_UNIX, SOCK_DGRAM, 0);
	printf("fd1: %d\n", fd1);
	int fd2 = socket(AF_UNIX, SOCK_STREAM, 0);
	printf("fd2: %d\n", fd2);
	return 0;
}

Expected result:

fd1: 3
fd2: 4

Actual result:

fd1: -1
fd2: 3

Change History (0)

Note: See TracTickets for help on using tickets.