Skip to content

Commit

Permalink
lxccontainer: s/pipe()/pipe2()/g
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
  • Loading branch information
Christian Brauner committed Jul 31, 2018
1 parent 808651d commit b64d41e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lxc/lxccontainer.c
Expand Up @@ -2278,7 +2278,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();
Expand Down Expand Up @@ -2373,7 +2373,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;
Expand Down

0 comments on commit b64d41e

Please sign in to comment.