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

restore: get real pid for each task (v2)



For the root task the clone syscall returns the pid in criu's pidns,
but for other processes the clone syscall returns PID in the restored
namespace.

The /proc/self link contains the PID value of the current process, so if
we want to determing the PID in a criu's pidns, we should use criu's
/proc.

v2: readlink() does not append a null byte to buf, so we must do that
Signed-off-by: default avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: default avatarPavel Emelyanov <xemul@parallels.com>
parent 56497223
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