[CRIU] [PATCH cr] restore: rework logic about temporary proc

Andrey Vagin avagin at openvz.org
Tue Jul 31 10:19:33 EDT 2012


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: Andrey Vagin <avagin at openvz.org>
---
 cr-restore.c |   57 ++++++++++++++++++++++-----------------------------------
 1 files changed, 22 insertions(+), 35 deletions(-)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-restore-rework-logic-about-temporary-proc.patch
Type: text/x-patch
Size: 2601 bytes
Desc: not available
Url : http://openvz.org/pipermail/criu/attachments/20120731/ad7299c7/0001-restore-rework-logic-about-temporary-proc.bin


More information about the CRIU mailing list