lxccontainer: s/pipe()/pipe2()/g

parent 988c11f7
...@@ -2050,7 +2050,7 @@ static char **do_lxcapi_get_interfaces(struct lxc_container *c) ...@@ -2050,7 +2050,7 @@ static char **do_lxcapi_get_interfaces(struct lxc_container *c)
char **interfaces = NULL; char **interfaces = NULL;
char interface[IFNAMSIZ]; char interface[IFNAMSIZ];
if (pipe(pipefd) < 0) if (pipe2(pipefd, O_CLOEXEC) < 0)
return NULL; return NULL;
pid = fork(); pid = fork();
...@@ -2143,7 +2143,7 @@ static char **do_lxcapi_get_ips(struct lxc_container *c, const char *interface, ...@@ -2143,7 +2143,7 @@ static char **do_lxcapi_get_ips(struct lxc_container *c, const char *interface,
int count = 0; int count = 0;
char **addresses = NULL; char **addresses = NULL;
ret = pipe(pipefd); ret = pipe2(pipefd, O_CLOEXEC);
if (ret < 0) { if (ret < 0) {
SYSERROR("Failed to create pipe"); SYSERROR("Failed to create pipe");
return NULL; return NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment