]> 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>
Mon, 10 Dec 2018 15:02:33 +0000 (16:02 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/lxccontainer.c

index 5464bd0aed9dd50373a25b90d82edfb3aabbdb50..641df150ec8225f05c9475d4cdfbdb159215694c 100644 (file)
@@ -2050,7 +2050,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();
@@ -2143,7 +2143,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;