Skip to content

Commit

Permalink
start: switch from SOCK_DGRAM to SOCK_STREAM
Browse files Browse the repository at this point in the history
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: Christian Brauner <christian.brauner@ubuntu.com>
  • Loading branch information
Christian Brauner committed Sep 3, 2017
1 parent 672c1e5 commit b9f522c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lxc/start.c
Expand Up @@ -1150,7 +1150,7 @@ static int lxc_spawn(struct lxc_handler *handler)
if (lxc_sync_init(handler))
return -1;

ret = socketpair(AF_UNIX, SOCK_DGRAM | SOCK_CLOEXEC, 0,
ret = socketpair(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0,
handler->data_sock);
if (ret < 0) {
lxc_sync_fini(handler);
Expand Down

0 comments on commit b9f522c

Please sign in to comment.