mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-01-23 02:14:37 +00:00
restore: attach to threads of the root task in case of rst_sibling
In case of rst_sibling, we are tracing the root task, but we are tracing only the leader thread, so we must attach to other threads to stop them. Reported-by: Ross Boucher <rboucher@gmail.com> Cc: Ross Boucher <rboucher@gmail.com> Signed-off-by: Andrey Vagin <avagin@openvz.org> Tested-by: Ross Boucher <rboucher@gmail.com> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
parent
02dff55113
commit
3364b10bbb
1 changed files with 1 additions and 1 deletions
|
|
@ -1582,7 +1582,7 @@ static int attach_to_tasks(bool root_seized, enum trace_flags *flag)
|
|||
for (i = 0; i < item->nr_threads; i++) {
|
||||
pid = item->threads[i].real;
|
||||
|
||||
if (item != root_item || !root_seized) {
|
||||
if (item != root_item || !root_seized || i != 0) {
|
||||
if (ptrace(PTRACE_ATTACH, pid, 0, 0)) {
|
||||
pr_perror("Can't attach to %d", pid);
|
||||
return -1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue