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>
Merge pull request #28 from avagin/xemul

rework child file descriptors and add a type of a handle that represents processes
vz: cal process_init(ct->p) for OpenVZ containers

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

Signed-off-by: Andrey Vagin <avagin@openvz.org>
util: move spawn_{wait,wake} functions

They will be used in the VZ driver too

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

Signed-off-by: Andrey Vagin <avagin@openvz.org>
vz: support a new interface of child file descriptors

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