[lxc-devel] The poor man's attach (v2)

2011-11-08 Thread Greg Kurz
Hi Daniel, Here's a resend for lxc-rexec with a fix for the linkage error. Also I added a patch to get rid of this warning: In function ‘handle_rexec_connect’: src/lxc/lxc_init.c:372:3: warning: implicit declaration of function ‘login_tty’ It appears safer to kill src/lxc/utmp.h instead of messi

[lxc-devel] [PATCH 4/4] lxc: introduce lxc-rexec (v2)

2011-11-08 Thread Greg Kurz
The lxc-rexec command connects to the lxc-init process on an AF_UNIX socket to spawn commands inside the container. Signals are forwarded from lxc-rexec to the command and the exit code is sent back to lxc-rexec. The command also runs in its own session with its own ctty. Multiple commands can be

[lxc-devel] [PATCH 3/4] lxc: kill utmp.h header

2011-11-08 Thread Greg Kurz
This header doesn't bring much benefit, as there's only one user for lxc_utmp_mainloop_add()... but it sure brings issues: it's completly impossible to include the system header because of the -I arguments generated by automake. Signed-off-by: Greg Kurz --- src/lxc/Makefile.am |2 +- src/l

[lxc-devel] [PATCH 1/4] lxc-init: use lxc_mainloop

2011-11-08 Thread Greg Kurz
The goal here is to be able to multiplex several event sources in lxc-init. It will be a lot easier to add I/O driven features: for example, a rexec-like service to start extra commands in a container. Signed-off-by: Greg Kurz Signed-off-by: Cedric Le Goater --- src/lxc/error.c| 23 +

[lxc-devel] [PATCH 2/4] lxc-init: use lxc logging infrastructure

2011-11-08 Thread Greg Kurz
Because there are no reasons that a vital component like lxc-init doesn't log into a file. Signed-off-by: Greg Kurz Signed-off-by: Cedric Le Goater --- src/lxc/execute.c | 22 - src/lxc/lxc.h |1 + src/lxc/lxc_execute.c |3 ++ src/lxc/lxc_init.c| 62