]> git.proxmox.com Git - mirror_lxc.git/commitdiff
start: switch from SOCK_DGRAM to SOCK_STREAM
authorChristian Brauner <christian.brauner@ubuntu.com>
Sun, 3 Sep 2017 23:27:30 +0000 (01:27 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Sun, 3 Sep 2017 23:27:30 +0000 (01:27 +0200)
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>
src/lxc/start.c

index 02e40f9ccb701f13baa9d5450ca86817e53883f5..c9af7a61fe208a1ad3248af62204cb2fb7e592e3 100644 (file)
@@ -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);