From d33c77e70ec870c0c665007abf1db40a537f2610 Mon Sep 17 00:00:00 2001 From: Christian Brauner Date: Mon, 4 Sep 2017 01:27:30 +0200 Subject: [PATCH] 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: Christian Brauner --- src/lxc/start.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lxc/start.c b/src/lxc/start.c index b74317185..5bb3db431 100644 --- a/src/lxc/start.c +++ b/src/lxc/start.c @@ -1215,7 +1215,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); -- 2.47.2