mirror of
https://github.com/troglobit/finit.git
synced 2026-10-11 17:02:42 +07:00
The unix(7) man page recommends using SOCK_SEQPACKET
Since Linux 2.6.4 the SOCK_SEQPACKET socket type is available for UNIX domain sockets on Linux. It is intended for; "a sequenced-packet socket that is connection-oriented, preserves message boundaries, and delivers messages in the order that they were sent." which sounds like us. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
+1
-1
@@ -38,7 +38,7 @@ int client_connect(void)
|
||||
.sun_path = INIT_SOCKET,
|
||||
};
|
||||
|
||||
sd = socket(AF_UNIX, SOCK_STREAM, 0);
|
||||
sd = socket(AF_UNIX, SOCK_SEQPACKET, 0);
|
||||
if (-1 == sd)
|
||||
err(1, "Failed creating UNIX domain socket");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user