the fd 0,1 and 2 are still inherited
and we only need the fd 2 (stderr) after
the start/restart of the application.
Signed-off-by: Michel Normand <normand@fr.ibm.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
exit(err);
}
+ /* no need of other inherited fds but stderr */
+ close(fileno(stdin));
+ close(fileno(stdout));
+
err = 0;
for (;;) {
int status;
goto out_fini;
}
+ /* no need of other inherited fds but stderr */
+ close(fileno(stdin));
+ close(fileno(stdout));
+
err = lxc_poll(name, handler);
if (err) {
ERROR("mainloop exited with an error");