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
0a26593a
Commit
0a26593a
authored
Nov 08, 2011
by
Cyrill Gorcunov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dump, restore: Add blocked signals mask
Signed-off-by:
Cyrill Gorcunov
<
gorcunov@gmail.com
>
parent
73e64bec
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
2 deletions
+28
-2
cr-dump.c
cr-dump.c
+22
-2
image.h
include/image.h
+1
-0
restorer.c
restorer.c
+5
-0
No files found.
cr-dump.c
View file @
0a26593a
...
@@ -408,7 +408,8 @@ err:
...
@@ -408,7 +408,8 @@ err:
static
int
get_task_stat
(
pid_t
pid
,
u8
*
comm
,
u32
*
flags
,
static
int
get_task_stat
(
pid_t
pid
,
u8
*
comm
,
u32
*
flags
,
u64
*
start_code
,
u64
*
end_code
,
u64
*
start_code
,
u64
*
end_code
,
u64
*
start_data
,
u64
*
end_data
,
u64
*
start_data
,
u64
*
end_data
,
u64
*
start_stack
,
u64
*
start_brk
)
u64
*
start_stack
,
u64
*
start_brk
,
u64
*
task_sigset
)
{
{
FILE
*
file
=
NULL
;
FILE
*
file
=
NULL
;
char
*
tok1
,
*
tok2
;
char
*
tok1
,
*
tok2
;
...
@@ -502,6 +503,24 @@ static int get_task_stat(pid_t pid, u8 *comm, u32 *flags,
...
@@ -502,6 +503,24 @@ static int get_task_stat(pid_t pid, u8 *comm, u32 *flags,
ret
=
0
;
ret
=
0
;
}
}
/*
* Now signals.
*/
fclose
(
file
);
file
=
fopen_proc
(
"%d/status"
,
"r"
,
pid
);
if
(
!
file
)
{
pr_perror
(
"Can't open %d status"
,
pid
);
goto
err
;
}
while
(
fgets
(
loc_buf
,
sizeof
(
loc_buf
),
file
))
{
if
(
!
strncmp
(
loc_buf
,
"SigCgt:"
,
7
))
{
char
*
end
;
*
task_sigset
=
strtol
(
&
loc_buf
[
8
],
&
end
,
16
);
break
;
}
}
err:
err:
if
(
file
)
if
(
file
)
fclose
(
file
);
fclose
(
file
);
...
@@ -659,7 +678,8 @@ static int dump_task_core_seized(pid_t pid, struct cr_fdset *cr_fdset)
...
@@ -659,7 +678,8 @@ static int dump_task_core_seized(pid_t pid, struct cr_fdset *cr_fdset)
&
core
->
mm_start_data
,
&
core
->
mm_start_data
,
&
core
->
mm_end_data
,
&
core
->
mm_end_data
,
&
core
->
mm_start_stack
,
&
core
->
mm_start_stack
,
&
core
->
mm_start_brk
);
&
core
->
mm_start_brk
,
&
core
->
task_sigset
);
if
(
ret
)
if
(
ret
)
goto
err_free
;
goto
err_free
;
pr_info
(
"OK
\n
"
);
pr_info
(
"OK
\n
"
);
...
...
include/image.h
View file @
0a26593a
...
@@ -196,6 +196,7 @@ struct core_entry {
...
@@ -196,6 +196,7 @@ struct core_entry {
u64
mm_start_stack
;
u64
mm_start_stack
;
u64
mm_start_brk
;
u64
mm_start_brk
;
u64
mm_brk
;
u64
mm_brk
;
u64
task_sigset
;
};
};
u8
__core_pad
[
CKPT_CORE_SIZE
];
u8
__core_pad
[
CKPT_CORE_SIZE
];
};
};
...
...
restorer.c
View file @
0a26593a
...
@@ -380,6 +380,11 @@ self_len_end:
...
@@ -380,6 +380,11 @@ self_len_end:
goto
core_restore_end
;
goto
core_restore_end
;
}
}
/*
* Blocked signals.
*/
rt_sigframe
->
uc
.
uc_sigmask
.
sig
[
0
]
=
core_entry
.
task_sigset
;
/*
/*
* sigframe is on stack.
* sigframe is on stack.
*/
*/
...
...
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