]> git.proxmox.com Git - mirror_lxc.git/commit - src/lxc/console.c
simplify pty allocation and implement pty logging
authorChristian Brauner <christian.brauner@mailbox.org>
Fri, 8 Apr 2016 13:53:36 +0000 (15:53 +0200)
committerChristian Brauner <christian.brauner@mailbox.org>
Fri, 8 Apr 2016 14:01:55 +0000 (16:01 +0200)
commitda41561c72067a5e109e8c5482dbeb4131641dc2
treecca9c94e8f78c47997900a2b4452da0c9bc13797
parentaa3ea4d3ccfccfc4c3e8b041c12ce8da3dc9e64d
simplify pty allocation and implement pty logging

lxc-attach allocated a pty in a manner that relied on ts->stdinfd and
ts->stdoutfd to be set. We had to resort to a trick to get it working when
output is redirected. The new implementation gets rid of the black magic and
also simplifies the code.

This commit also implements pty logging for lxc-attach. Users will now be able
to log commands and corresponding output to a file given that lxc-attach
allocates a pty.

Signed-off-by: Christian Brauner <christian.brauner@mailbox.org>
src/lxc/console.c
src/lxc/console.h
src/lxc/lxc_attach.c
src/lxc/start.c