ct: fix exec to really enter into pidns (v3)

setns() of the pid namespace unlike unsharing of other namespaces
does not take affect immediately. Instead it affects the children
created with fork and clone.

v2: don't forget about the end mark in close_fds
v3: use nice and dandy env_wait()

https://bugzilla.openvz.org/show_bug.cgi?id=2658

Reported-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
Signed-off-by: Andrey Vagin <avagin@openvz.org>
2 files changed