From 0e8afcc0d72c02a40630fdf6938699474462fa43 Mon Sep 17 00:00:00 2001 From: Christian Brauner Date: Sun, 29 Jul 2018 23:09:45 +0200 Subject: [PATCH] lxccontainer: s/pipe()/pipe2()/g Signed-off-by: Christian Brauner --- src/lxc/lxccontainer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c index 5464bd0ae..641df150e 100644 --- a/src/lxc/lxccontainer.c +++ b/src/lxc/lxccontainer.c @@ -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; -- 2.47.2