Commit 766a42e3 authored by Pavel Emelyanov's avatar Pavel Emelyanov Committed by Cyrill Gorcunov

ptrace: Kill task with -9 explicitly when detaching

Strange fact, but a task seems to live for some time after PTRACE_KILL :(
Don't know yet why this happens, I'm poking Oleg on that, but this one makes
it die right at once.

The streaming file read test passes after this.
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
parent e6160516
...@@ -23,9 +23,10 @@ int unseize_task(pid_t pid, enum cr_task_state st) ...@@ -23,9 +23,10 @@ int unseize_task(pid_t pid, enum cr_task_state st)
{ {
if (st == CR_TASK_STOP) if (st == CR_TASK_STOP)
return ptrace(PTRACE_DETACH, pid, NULL, NULL); return ptrace(PTRACE_DETACH, pid, NULL, NULL);
else if (st == CR_TASK_KILL) else if (st == CR_TASK_KILL) {
kill(pid, SIGKILL);
return ptrace(PTRACE_KILL, pid, NULL, NULL); return ptrace(PTRACE_KILL, pid, NULL, NULL);
else { } else {
BUG_ON(1); BUG_ON(1);
return -1; return -1;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment