From: Christian Brauner Date: Sun, 3 Sep 2017 23:27:30 +0000 (+0200) Subject: start: switch from SOCK_DGRAM to SOCK_STREAM X-Git-Tag: lxc-2.1.0~9^2 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1773%2Fhead;p=thirdparty%2Flxc.git 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 --- diff --git a/src/lxc/start.c b/src/lxc/start.c index 02e40f9cc..c9af7a61f 100644 --- a/src/lxc/start.c +++ b/src/lxc/start.c @@ -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);