start: switch from SOCK_DGRAM to SOCK_STREAM

Writes < PIPE_BUF will be atomic. PIPE_BUF is guaranteed to be 512 by POSIX and Linux guarantess 4096. Nothing we send around goes over this limit. Signed-off-by: 's avatarChristian Brauner <christian.brauner@ubuntu.com>
parent 672c1e58
...@@ -1150,7 +1150,7 @@ static int lxc_spawn(struct lxc_handler *handler) ...@@ -1150,7 +1150,7 @@ static int lxc_spawn(struct lxc_handler *handler)
if (lxc_sync_init(handler)) if (lxc_sync_init(handler))
return -1; return -1;
ret = socketpair(AF_UNIX, SOCK_DGRAM | SOCK_CLOEXEC, 0, ret = socketpair(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0,
handler->data_sock); handler->data_sock);
if (ret < 0) { if (ret < 0) {
lxc_sync_fini(handler); lxc_sync_fini(handler);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment