Skip to content
Commit 2e9ddccd authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov
Browse files

restore: rework logic about temporary proc



We need proc for restoring processes. The existent /proc may be not suitable.
E.g. If processes are in pidns.

crtools mounts procfs in a temporary directory, but it should be
umounted at the end. Before this patch crtools did that, but
it doesn't work if processes in a mount namespace.

Actually this logic can be simplified and this patch does that.
* create a tmp dir
* mount procfs
* open this directory and save a file descriptor.
* detach procfs
* remove the tmp dir
* access to proc via openat, statat and so on.

Signed-off-by: default avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: default avatarPavel Emelyanov <xemul@parallels.com>
parent 2f272fa1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment