From: Christian Brauner Date: Sun, 29 Jul 2018 21:09:45 +0000 (+0200) Subject: lxccontainer: s/pipe()/pipe2()/g X-Git-Tag: lxc-2.0.10~42 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0e8afcc0d72c02a40630fdf6938699474462fa43;p=thirdparty%2Flxc.git lxccontainer: s/pipe()/pipe2()/g Signed-off-by: Christian Brauner --- 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;