]> git.proxmox.com Git - mirror_lxc.git/commitdiff
conf: s/pipe()/pipe2()/g
authorChristian Brauner <christian.brauner@ubuntu.com>
Sun, 29 Jul 2018 21:02:14 +0000 (23:02 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Sun, 29 Jul 2018 22:16:13 +0000 (00:16 +0200)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/conf.c

index ff9bd091b21e16397a32fa7b977f76ae52cefeb8..e55c40bf2f6f677531af8005979b732d7888df89 100644 (file)
@@ -4359,7 +4359,7 @@ int userns_exec_1(struct lxc_conf *conf, int (*fn)(void *), void *data,
        if (!idmap)
                return -1;
 
-       ret = pipe(p);
+       ret = pipe2(p, O_CLOEXEC);
        if (ret < 0) {
                SYSERROR("Failed to create pipe");
                return -1;
@@ -4441,7 +4441,7 @@ int userns_exec_full(struct lxc_conf *conf, int (*fn)(void *), void *data,
        if (!conf)
                return -EINVAL;
 
-       ret = pipe(p);
+       ret = pipe2(p, O_CLOEXEC);
        if (ret < 0) {
                SYSERROR("opening pipe");
                return -1;