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
d0eec0e2
Commit
d0eec0e2
authored
Nov 18, 2011
by
Cyrill Gorcunov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
restore: Drop self-vmas file once it's not needed
Signed-off-by:
Cyrill Gorcunov
<
gorcunov@gmail.com
>
parent
d9aa7f02
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
3 deletions
+9
-3
cr-restore.c
cr-restore.c
+7
-3
restorer.h
include/restorer.h
+1
-0
restorer.c
restorer.c
+1
-0
No files found.
cr-restore.c
View file @
d0eec0e2
...
@@ -1295,6 +1295,7 @@ static void sigreturn_restore(pid_t pstree_pid, pid_t pid)
...
@@ -1295,6 +1295,7 @@ static void sigreturn_restore(pid_t pstree_pid, pid_t pid)
struct
task_restore_core_args
*
task_args
;
struct
task_restore_core_args
*
task_args
;
struct
thread_restore_args
*
thread_args
;
struct
thread_restore_args
*
thread_args
;
char
self_vmas_path
[
64
];
char
path
[
64
];
char
path
[
64
];
LIST_HEAD
(
self_vma_list
);
LIST_HEAD
(
self_vma_list
);
...
@@ -1334,9 +1335,9 @@ static void sigreturn_restore(pid_t pstree_pid, pid_t pid)
...
@@ -1334,9 +1335,9 @@ static void sigreturn_restore(pid_t pstree_pid, pid_t pid)
goto
err
;
goto
err
;
}
}
snprintf
(
path
,
sizeof
(
path
),
FMT_FNAME_VMAS
,
getpid
());
snprintf
(
self_vmas_path
,
sizeof
(
self_vmas_
path
),
FMT_FNAME_VMAS
,
getpid
());
unlink
(
path
);
unlink
(
self_vmas_
path
);
fd_self_vmas
=
open
(
path
,
O_CREAT
|
O_RDWR
,
CR_FD_PERM
);
fd_self_vmas
=
open
(
self_vmas_
path
,
O_CREAT
|
O_RDWR
,
CR_FD_PERM
);
if
(
fd_self_vmas
<
0
)
{
if
(
fd_self_vmas
<
0
)
{
pr_perror
(
"Can't open %s
\n
"
,
path
);
pr_perror
(
"Can't open %s
\n
"
,
path
);
goto
err
;
goto
err
;
...
@@ -1453,6 +1454,9 @@ static void sigreturn_restore(pid_t pstree_pid, pid_t pid)
...
@@ -1453,6 +1454,9 @@ static void sigreturn_restore(pid_t pstree_pid, pid_t pid)
task_args
->
pid
=
pid
;
task_args
->
pid
=
pid
;
task_args
->
fd_core
=
fd_core
;
task_args
->
fd_core
=
fd_core
;
task_args
->
fd_self_vmas
=
fd_self_vmas
;
task_args
->
fd_self_vmas
=
fd_self_vmas
;
strncpy
(
task_args
->
self_vmas_path
,
self_vmas_path
,
sizeof
(
task_args
->
self_vmas_path
));
rst_mutex_init
(
&
task_args
->
rst_lock
);
rst_mutex_init
(
&
task_args
->
rst_lock
);
...
...
include/restorer.h
View file @
d0eec0e2
...
@@ -65,6 +65,7 @@ struct task_restore_core_args {
...
@@ -65,6 +65,7 @@ struct task_restore_core_args {
int
pid
;
/* task pid */
int
pid
;
/* task pid */
int
fd_core
;
/* opened core file */
int
fd_core
;
/* opened core file */
int
fd_self_vmas
;
/* opened file with running VMAs to unmap */
int
fd_self_vmas
;
/* opened file with running VMAs to unmap */
char
self_vmas_path
[
64
];
/* path to it, to unlink it once we're done */
bool
restore_threads
;
/* if to restore threads */
bool
restore_threads
;
/* if to restore threads */
rst_mutex_t
rst_lock
;
rst_mutex_t
rst_lock
;
...
...
restorer.c
View file @
d0eec0e2
...
@@ -201,6 +201,7 @@ self_len_end:
...
@@ -201,6 +201,7 @@ self_len_end:
}
}
sys_close
(
args
->
fd_self_vmas
);
sys_close
(
args
->
fd_self_vmas
);
sys_unlink
(
args
->
self_vmas_path
);
/*
/*
* OK, lets try to map new one.
* OK, lets try to map new one.
...
...
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