]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
lxccontainer: s/pipe()/pipe2()/g
authorChristian Brauner <christian.brauner@ubuntu.com>
Sun, 29 Jul 2018 21:09:45 +0000 (23:09 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Sun, 29 Jul 2018 22:16:17 +0000 (00:16 +0200)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/lxccontainer.c

index 98e260cfde619e49740810c1b979e6d6e6fa1bbc..5912a76ba6b5de22f5f6f953df6e9de33f0dfa92 100644 (file)
@@ -2299,7 +2299,7 @@ static char **do_lxcapi_get_interfaces(struct lxc_container *c)
        char **interfaces = NULL;
        char interface[IFNAMSIZ];
 
-       if (pipe(pipefd) < 0)
+       if (pipe2(pipefd, O_CLOEXEC) < 0)
                return NULL;
 
        pid = fork();
@@ -2394,7 +2394,7 @@ static char **do_lxcapi_get_ips(struct lxc_container *c, const char *interface,
        int count = 0;
        char **addresses = NULL;
 
-       ret = pipe(pipefd);
+       ret = pipe2(pipefd, O_CLOEXEC);
        if (ret < 0) {
                SYSERROR("Failed to create pipe");
                return NULL;