mirror of
https://github.com/checkpoint-restore/criu
synced 2025-09-02 07:15:31 +00:00
dump: Add comment why get_task_regs for task is in such a strange place
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
@@ -959,6 +959,12 @@ static int parasite_start_daemon(struct parasite_ctl *ctl, struct pstree_item *i
|
|||||||
{
|
{
|
||||||
pid_t pid = ctl->pid.real;
|
pid_t pid = ctl->pid.real;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Get task registers before going daemon, since the
|
||||||
|
* get_task_regs needs to call ptrace on _stopped_ task,
|
||||||
|
* while in daemon it is not such.
|
||||||
|
*/
|
||||||
|
|
||||||
if (get_task_regs(pid, ctl->regs_orig, item->core[0])) {
|
if (get_task_regs(pid, ctl->regs_orig, item->core[0])) {
|
||||||
pr_err("Can't obtain regs for thread %d\n", pid);
|
pr_err("Can't obtain regs for thread %d\n", pid);
|
||||||
return -1;
|
return -1;
|
||||||
|
Reference in New Issue
Block a user