criu/include
Andrey Vagin 5a37481914 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: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-09-23 15:22:58 +04:00
..
asm-generic asm: Add builtin_memcpy, builtin_memcmp generic helpers 2013-05-23 16:51:14 +04:00
bug.h clang: add an exception for BUG_ON_HANDLER 2013-04-04 14:00:21 +04:00
compiler.h include/compiler.h: Cleanup 2013-02-15 17:34:38 +04:00
cpu.h cpu: Make cpu routines being per-acrh 2013-02-18 18:42:08 +04:00
cr-service.h service: Simplify dump-responce sending 2013-09-16 15:40:04 +04:00
cr-show.h show: Remove dead code 2013-08-24 04:03:31 +04:00
crtools.h restore: get real pid for each task (v2) 2013-09-23 15:22:58 +04:00
err.h headers: Add err.h header 2013-04-02 20:27:51 +04:00
eventfd.h show: Replace one-line show_foo calls with args array 2013-08-24 04:00:32 +04:00
eventpoll.h show: Replace one-line show_foo calls with args array 2013-08-24 04:00:32 +04:00
fifo.h collect: Shorten common images collecting code 2013-08-21 03:52:18 +04:00
file-ids.h headers: Change "../protobuf/" to "protobuf/" 2013-02-15 17:33:06 +04:00
file-lock.h lock: Show long option in log message about using one 2013-03-27 20:17:59 +04:00
files-reg.h collect: Shorten common images collecting code 2013-08-21 03:52:18 +04:00
files.h files: Add more comments about shared files dump/restore 2013-09-10 12:13:36 +04:00
fsnotify.h show: Replace one-line show_foo calls with args array 2013-08-24 04:00:32 +04:00
image-desc.h show: Replace one-line show_foo calls with args array 2013-08-24 04:00:32 +04:00
image.h unix: Handle service socket on dump and restore 2013-09-13 15:53:20 +04:00
inet_diag.h headers: Unify include guards (in comments) and a few fixes 2012-12-25 22:40:24 +04:00
ipc_ns.h show: Replace one-line show_foo calls with args array 2013-08-24 04:00:32 +04:00
kcmp-ids.h headers: Unify include guards (in comments) and a few fixes 2012-12-25 22:40:24 +04:00
kerndat.h soft-dirty: Check that kernel reports soft-dirty bits 2013-04-15 13:24:32 +04:00
libnetlink.h headers: Unify include guards (in comments) and a few fixes 2012-12-25 22:40:24 +04:00
list.h headers: list.h -- Add hlist helpers 2013-04-02 20:29:25 +04:00
lock.h atomic: Use atomic_read instead of atomic_get 2013-08-16 19:37:06 +04:00
log-levels.h headers: Unify include guards (in comments) and a few fixes 2012-12-25 22:40:24 +04:00
log.h v2 crtools: write pidfile, when service/page server is run as daemon and "--pidfile" is set 2013-09-16 15:45:01 +04:00
magic.h show: Replace one-line show_foo calls with args array 2013-08-24 04:00:32 +04:00
mem.h mem: Add PME_ bits for page frame retrieval 2013-05-23 12:51:27 +04:00
mount.h show: Replace one-line show_foo calls with args array 2013-08-24 04:00:32 +04:00
namespaces.h collect: Shorten common images collecting code 2013-08-21 03:52:18 +04:00
net.h show: Replace one-line show_foo calls with args array 2013-08-24 04:00:32 +04:00
netfilter.h headers: Unify include guards (in comments) and a few fixes 2012-12-25 22:40:24 +04:00
netlink_diag.h crtools: add netlink_diag.h 2013-03-26 00:23:13 +04:00
packet_diag.h headers: Unify include guards (in comments) and a few fixes 2012-12-25 22:40:24 +04:00
page-pipe.h mem: Comment page-read, page-xfer and page-pipe 2013-04-16 11:34:53 +04:00
page-read.h mem: Comment page-read, page-xfer and page-pipe 2013-04-16 11:34:53 +04:00
page-xfer.h page-server: check that all data have been accepted 2013-08-09 15:39:37 +04:00
parasite-syscall.h parasite: Rename ack-waiting function to look better 2013-07-17 08:56:17 +04:00
parasite.h util: Rename pie's util-net.c into util.c 2013-07-29 12:43:30 +04:00
pipes.h collect: Shorten common images collecting code 2013-08-21 03:52:18 +04:00
proc_parse.h mounts: find mounts, which are propagated from a current one (v2) 2013-08-30 15:01:30 +04:00
protobuf-desc.h build: Generate most of the pb-desc automatically 2013-08-23 21:47:31 +04:00
protobuf.h show: Remove dead code 2013-08-24 04:03:31 +04:00
pstree.h parasite: use transparent thread indexes 2013-05-24 18:47:11 +04:00
ptrace.h check: check PTRACE_{GET,SET}SIGMASK 2013-07-16 17:24:16 +04:00
rbtree.h x86: moved x86-specific files into the directory arch/x86. 2013-01-09 17:02:47 +04:00
restorer.h restore: do not kill processes if not-all of them have been created 2013-08-20 15:17:30 +04:00
shmem.h headers: Change "../protobuf/" to "protobuf/" 2013-02-15 17:33:06 +04:00
sigframe.h restore: Add restoration of alternative signal stack 2013-07-10 17:31:12 +04:00
signalfd.h show: Replace one-line show_foo calls with args array 2013-08-24 04:00:32 +04:00
sk-inet.h show: Replace one-line show_foo calls with args array 2013-08-24 04:00:32 +04:00
sk-packet.h show: Replace one-line show_foo calls with args array 2013-08-24 04:00:32 +04:00
sk-queue.h show: Replace one-line show_foo calls with args array 2013-08-24 04:00:32 +04:00
sockets.h show: Replace one-line show_foo calls with args array 2013-08-24 04:00:32 +04:00
stats.h show: Replace one-line show_foo calls with args array 2013-08-24 04:00:32 +04:00
string.h Add strlcpy helper 2013-08-28 19:06:43 +04:00
syscall-types.h syscalls: Add proper syscalls definition. 2013-07-01 16:19:21 +04:00
sysctl.h headers: Unify include guards (in comments) and a few fixes 2012-12-25 22:40:24 +04:00
tty.h collect: Shorten common images collecting code 2013-08-21 03:52:18 +04:00
tun.h check: Add tun support 2013-08-23 19:18:47 +04:00
unix_diag.h x86: moved x86-specific files into the directory arch/x86. 2013-01-09 17:02:47 +04:00
util-pie.h mount: Factor out detached mountpoint opening 2013-07-29 13:12:00 +04:00
util.h util: Make set_proc_mountpoint static 2013-08-11 20:02:33 +04:00
uts_ns.h show: Replace one-line show_foo calls with args array 2013-08-24 04:00:32 +04:00
vdso.h vdso: Diet include/vdso.h 2013-06-13 19:41:09 +04:00
xmalloc.h headers: util.h -- Move memory helpers to xmalloc.h 2013-04-02 21:15:27 +04:00