]> git.proxmox.com Git - mirror_lxc.git/commit - src/lxc/terminal.c
separate console device from console log
authorDwight Engen <dwight.engen@oracle.com>
Thu, 27 Dec 2012 22:01:26 +0000 (17:01 -0500)
committerStéphane Graber <stgraber@ubuntu.com>
Wed, 2 Jan 2013 23:08:12 +0000 (18:08 -0500)
commit596a818d4b8b55586d36af518b745cd96b24c67a
treee0fba362aaf5cb3c62d2889fd0eb3df12556ce99
parent4199da3061d02e9b5087faa16dd875d4bfeb3989
separate console device from console log

lxc-start -c makes the named file/device the container's console, but using
this with a regular file in order to get a log of the console output does
not work very well if you also want to login on the console. This change
implements an additional option (-L) to simply log the console's output to
a file.

Both options can be used separately or together. For example to get a usable
console and log: lxc-start -n name -c /dev/tty8 -L console.log

The console state is cleaned up more when lxc_delete_console is called, and
some of the clean up paths in lxc_create_console were fixed.

The lxc_priv and lxc_unpriv macros were modified to make use of gcc's local
label feature so they can be expanded more than once in the same function.

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
doc/lxc-start.sgml.in
src/lxc/arguments.h
src/lxc/caps.h
src/lxc/conf.c
src/lxc/conf.h
src/lxc/console.c
src/lxc/lxc_start.c