Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
criu
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhul
criu
Commits
57965aab
Commit
57965aab
authored
Aug 05, 2014
by
Pavel Emelyanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rst: Check for task->state to restore in one place
Signed-off-by:
Pavel Emelyanov
<
xemul@parallels.com
>
parent
1211ca01
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
cr-restore.c
cr-restore.c
+6
-5
No files found.
cr-restore.c
View file @
57965aab
...
@@ -862,7 +862,7 @@ static int restore_one_task(int pid, CoreEntry *core)
...
@@ -862,7 +862,7 @@ static int restore_one_task(int pid, CoreEntry *core)
/* No more fork()-s => no more per-pid logs */
/* No more fork()-s => no more per-pid logs */
switch
(
(
int
)
core
->
tc
->
task_
state
)
{
switch
(
current
->
state
)
{
case
TASK_ALIVE
:
case
TASK_ALIVE
:
case
TASK_STOPPED
:
case
TASK_STOPPED
:
ret
=
restore_one_alive_task
(
pid
,
core
);
ret
=
restore_one_alive_task
(
pid
,
core
);
...
@@ -870,13 +870,17 @@ static int restore_one_task(int pid, CoreEntry *core)
...
@@ -870,13 +870,17 @@ static int restore_one_task(int pid, CoreEntry *core)
case
TASK_DEAD
:
case
TASK_DEAD
:
ret
=
restore_one_zombie
(
pid
,
core
);
ret
=
restore_one_zombie
(
pid
,
core
);
break
;
break
;
case
TASK_HELPER
:
ret
=
0
;
break
;
default:
default:
pr_err
(
"Unknown state in code %d
\n
"
,
(
int
)
core
->
tc
->
task_state
);
pr_err
(
"Unknown state in code %d
\n
"
,
(
int
)
core
->
tc
->
task_state
);
ret
=
-
1
;
ret
=
-
1
;
break
;
break
;
}
}
core_entry__free_unpacked
(
core
,
NULL
);
if
(
core
)
core_entry__free_unpacked
(
core
,
NULL
);
return
ret
;
return
ret
;
}
}
...
@@ -1321,9 +1325,6 @@ static int restore_task_with_children(void *_arg)
...
@@ -1321,9 +1325,6 @@ static int restore_task_with_children(void *_arg)
if
(
current
->
parent
==
NULL
&&
fini_mnt_ns
())
if
(
current
->
parent
==
NULL
&&
fini_mnt_ns
())
exit
(
1
);
exit
(
1
);
if
(
current
->
state
==
TASK_HELPER
)
return
0
;
return
restore_one_task
(
current
->
pid
.
virt
,
ca
->
core
);
return
restore_one_task
(
current
->
pid
.
virt
,
ca
->
core
);
err:
err:
if
(
current
->
parent
==
NULL
)
if
(
current
->
parent
==
NULL
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment