]> git.ipfire.org Git - thirdparty/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>
Mon, 4 Sep 2017 16:38:01 +0000 (18:38 +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 b74317185e385f18dd2d6b95ba2d4cafd2f8b63e..5bb3db4313d8da314de5d7212cb146f7ed3d67a6 100644 (file)
@@ -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);