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
805e25ef
Commit
805e25ef
authored
Dec 20, 2013
by
Pavel Emelyanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ptrace: Add comment about early interrupt
Signed-off-by:
Pavel Emelyanov
<
xemul@parallels.com
>
parent
800c4d09
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
ptrace.c
ptrace.c
+9
-1
No files found.
ptrace.c
View file @
805e25ef
...
...
@@ -53,7 +53,15 @@ int seize_task(pid_t pid, pid_t ppid, pid_t *pgid, pid_t *sid)
ret
=
ptrace
(
PTRACE_SEIZE
,
pid
,
NULL
,
0
);
ptrace_errno
=
errno
;
if
(
ret
==
0
)
{
/* Stop task before determing its state */
/*
* If we SEIZE-d the task stop it before going
* and reading its stat from proc. Otherwise task
* may die _while_ we're doing it and we'll have
* inconsistent seize/state pair.
*
* If task dies after we seize it but before we
* do this interrupt, we'll notice it via proc.
*/
ret
=
ptrace
(
PTRACE_INTERRUPT
,
pid
,
NULL
,
NULL
);
if
(
ret
<
0
)
{
pr_perror
(
"SEIZE %d: can't interrupt task"
,
pid
);
...
...
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