That breaks the reboot because when we reexec, fd 0 and fd 1 will be
closed and these one are created by lxc, not inherited.
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
return -1;
}
+ DEBUG("allocated pty '%s' (%d/%d)",
+ pty_info->name, pty_info->master, pty_info->slave);
+
/* Prevent leaking the file descriptors to the container */
fcntl(pty_info->master, F_SETFD, FD_CLOEXEC);
fcntl(pty_info->slave, F_SETFD, FD_CLOEXEC);
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");