Signed-off-by: Stéphane Graber <[email protected]>
---
src/lxc/utils.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/lxc/utils.c b/src/lxc/utils.c
index b7a29cb..90401a5 100644
--- a/src/lxc/utils.c
+++ b/src/lxc/utils.c
@@ -642,7 +642,10 @@ extern struct lxc_popen_FILE *lxc_popen(const char
*command)
* But it must not be marked close-on-exec.
* 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);
+ }
}
/*
--
1.9.rc1
_______________________________________________
lxc-devel mailing list
[email protected]
http://lists.linuxcontainers.org/listinfo/lxc-devel