Opened 23 months ago
Closed 16 months ago
#18204 closed bug (fixed)
Datagram UNIX sockets are not supported
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 (last modified by )
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
Related code: https://git.haiku-os.org/haiku/tree/src/add-ons/kernel/network/protocols/unix
Change History (2)
comment:1 by , 23 months ago
Description: | modified (diff) |
---|
comment:2 by , 16 months ago
Milestone: | Unscheduled → R1/beta5 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Implemented in hrev57155.