Merge pull request #1 from xemul/master

Update from origin
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>
Merge pull request #27 from aburluka/vz_branch

Vz branch
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>
vz: use clone() instead of fork()

It's preparation to use CLONE_PARENT.

Signed-off-by: Andrey Vagin <avagin@openvz.org>
vz: use CLONE_PARENT to fork a container

It allows to avoid a proxy process.

Signed-off-by: Andrey Vagin <avagin@openvz.org>
vz: use CLONE_PARENT to enter into CT
util: move spawn_{wait,wake} functions

They will be used in the VZ driver too
vz: handle errors of execve