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 29, 2018
1 parent 9f4866a commit 0ac84f0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lxc/lxccontainer.c
Expand Up @@ -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();
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 0ac84f0

Please sign in to comment.