From 0ac84f04d16947cf9cf0393e8507c748952a253b 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 98e260cfd..5912a76ba 100644 --- a/src/lxc/lxccontainer.c +++ b/src/lxc/lxccontainer.c @@ -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; -- 2.47.2