Add a higher level console API that opens a tty/console and runs the mainloop as well. Rename existing API to console_getfd(). Use these in the python binding. Allow attaching a console peer after container bootup, including if the container was launched with -d. This is made possible by allocation of a "proxy" pty as the peer when the console is attached to. Improve handling of SIGWINCH, the pty size will be correctly set at the beginning of a session and future changes when using the lxc_console() API will be propagated to it as well. Refactor some common code between lxc_console.c and console.c. The variable wait4q (renamed to saw_escape) was static, making the mainloop callback not safe across threads. This wasn't a problem when the callback was in the non-threaded lxc-console, but now that it is internal to console.c, we have to take care of it. This is now contained in a per-tty state structure. Don't attempt to open /dev/null as the console peer since /dev/null cannot be added to the mainloop (epoll_ctl() fails with EPERM). This isn't needed to get the console setup (and the log to work) since the case of not having a peer at console init time has to be handled to allow for attaching to it later. Move signalfd libc wrapper/replacement to utils.h. Signed-off-by:Dwight Engen <dwight.engen@oracle.com> Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com>
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| examples | Loading commit data... | |
| legacy | Loading commit data... | |
| rootfs | Loading commit data... | |
| FAQ.txt | Loading commit data... | |
| Makefile.am | Loading commit data... | |
| common_options.sgml.in | Loading commit data... | |
| lxc-attach.sgml.in | Loading commit data... | |
| lxc-cgroup.sgml.in | Loading commit data... | |
| lxc-checkconfig.sgml.in | Loading commit data... | |
| lxc-checkpoint.sgml.in | Loading commit data... | |
| lxc-clone.sgml.in | Loading commit data... | |
| lxc-console.sgml.in | Loading commit data... | |
| lxc-create.sgml.in | Loading commit data... | |
| lxc-destroy.sgml.in | Loading commit data... | |
| lxc-device.sgml.in | Loading commit data... | |
| lxc-execute.sgml.in | Loading commit data... | |
| lxc-freeze.sgml.in | Loading commit data... | |
| lxc-info.sgml.in | Loading commit data... | |
| lxc-kill.sgml.in | Loading commit data... | |
| lxc-ls.sgml.in | Loading commit data... | |
| lxc-monitor.sgml.in | Loading commit data... | |
| lxc-netstat.sgml.in | Loading commit data... | |
| lxc-ps.sgml.in | Loading commit data... | |
| lxc-restart.sgml.in | Loading commit data... | |
| lxc-start-ephemeral.sgml.in | Loading commit data... | |
| lxc-start.sgml.in | Loading commit data... | |
| lxc-stop.sgml.in | Loading commit data... | |
| lxc-top.sgml.in | Loading commit data... | |
| lxc-unfreeze.sgml.in | Loading commit data... | |
| lxc-unshare.sgml.in | Loading commit data... | |
| lxc-version.sgml.in | Loading commit data... | |
| lxc-wait.sgml.in | Loading commit data... | |
| lxc.conf | Loading commit data... | |
| lxc.conf.sgml.in | Loading commit data... | |
| lxc.sgml.in | Loading commit data... | |
| see_also.sgml.in | Loading commit data... |