Commit 57d2be54 by Stéphane Graber

coverity: Check return value of fcntl in lxc_popen

parent e7de366c
...@@ -642,7 +642,10 @@ extern struct lxc_popen_FILE *lxc_popen(const char *command) ...@@ -642,7 +642,10 @@ extern struct lxc_popen_FILE *lxc_popen(const char *command)
* But it must not be marked close-on-exec. * But it must not be marked close-on-exec.
* Undo the effects. * Undo the effects.
*/ */
fcntl(child_end, F_SETFD, 0); if (fcntl(child_end, F_SETFD, 0) != 0) {
SYSERROR("Failed to remove FD_CLOEXEC from fd.");
exit(127);
}
} }
/* /*
......
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