VZ containers: removed mk_reboot_script

That function is currently useless and causes warnings
in some Ubuntu versions.

Signed-off-by: Alexander Burluka <aburluka@parallels.com>
VZ containers: Bug fixes

1) added missed break in switch statement
2) changed bad error message in pre_setup env
3) prevent second chdir in vzctl_chroot
4) added file descriptors transmission to execve in vz_enter_execve

Signed-off-by: Alexander Burluka <aburluka@parallels.com>
VZ containers: move vz_ct_create func to vz.c

Moved it to made sources clearer

Signed-off-by: Alexander Burluka <aburluka@parallels.com>
VZ containers: fix mac address setting

Mac addr setup was broken, fixed it.
Signed-off-by: Alexander Burluka <aburluka@parallels.com>
VZ containers: fix broken vz_ct_wait

vz_ct_wait was waiting for wrong pid, fix it.

Signed-off-by: Alexander Burluka <aburluka@parallels.com>
VZ containers: Make fds proper closing vz_spawn_execve, vz_enter_execve

Fix it, so vz_enter test is now passed.

Signed-off-by: Alexander Burluka <aburluka@parallels.com>
tests: fix root downloading url

Now it's generated with current date
Signed-off-by: Alexander Burluka <aburluka@parallels.com>
ctags: create tags for *.go

Signed-off-by: Andrew Vagin <avagin@openvz.org>
process: stdin, stdout, stderr

Signed-off-by: Andrew Vagin <avagin@openvz.org>
go: fmt

Signed-off-by: Andrew Vagin <avagin@openvz.org>
process: move functions from libct.go

Signed-off-by: Andrew Vagin <avagin@openvz.org>
open_fds_proc() opens /proc/self/fd

Signed-off-by: Andrew Vagin <avagin@openvz.org>
libct: rework child file descriptors

Now we can give an array of file descriptors for a new process.
File descriptors from this array are remapped to places accoding to
positions in the array. All other descriptrs will be closed.

Before this patch we had ability to change standard descriptors for
*exec* functions. Now we can give any set of file descriptros for
any process which is executed in CT. If an array isn't set, a process
will inherite all descriptros from parent.

Signed-off-by: Andrey Vagin <avagin@openvz.org>
readme: fix path to uapi/libct.h

Signed-off-by: Andrey Vagin <avagin@openvz.org>
libct: remove async events

They has to be deleted together with the unix backend

Signed-off-by: Andrey Vagin <avagin@openvz.org>
libct: add a type of a handle that represents processes

A process handle allow to wait a process and get its exit code.

Signed-off-by: Andrew Vagin <avagin@openvz.org>
test/Makefile: the "all" traget must be the first one

Signed-off-by: Andrey Vagin <avagin@openvz.org>
libct: local_process_create_desc() should not return NULL

It must return an error code

Signed-off-by: Andrey Vagin <avagin@openvz.org>
test: handle errors

Signed-off-by: Andrey Vagin <avagin@openvz.org>
vz: cal process_init(ct->p) for OpenVZ containers

Signed-off-by: Andrey Vagin <avagin@openvz.org>