[CRIU] ptrace attached during a dump?

Sebastian Biedermann biedermann at seceng.informatik.tu-darmstadt.de
Wed Nov 20 07:42:05 PST 2013


Hi guys!

I'm wondering if you use ptrace attached/detached to a process once it
is dumped.
Actually I saw that ptrace gets only three times attached in the source
code:

$ grep -r "PTRACE_ATTACH" ../crtools/
../crtools/cr-restore.c:                        if
(ptrace(PTRACE_ATTACH, pid, 0, 0)) {
../crtools/test/zdtm/live/transition/ptrace.c:          if
(ptrace(PTRACE_ATTACH, pids[i], (char *)1, NULL) == -1) {
../crtools/cr-check.c:  if (ptrace(PTRACE_ATTACH, pid, NULL, NULL) == -1)

But I found out that once I dump a process ($ sudo ./crtools/criu dump
-t 22459 --shell-job) none of them was used.
Don't you attach ptrace once a process is dumped? However, if you use it
for dumping, where in the code is it attached and detached?

Thank you!

-- 
Sebastian




More information about the CRIU mailing list