Commit 18242f83 authored by Pavel Emelyanov's avatar Pavel Emelyanov

seize: Warn if crtools tried to seize self

That's not allowed by kernel, but having explicit message is nice.
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 21cf5d2e
...@@ -72,8 +72,11 @@ int seize_task(pid_t pid, pid_t ppid, pid_t *pgid, pid_t *sid) ...@@ -72,8 +72,11 @@ int seize_task(pid_t pid, pid_t ppid, pid_t *pgid, pid_t *sid)
if (ret < 0) { if (ret < 0) {
if (ps.state != 'Z') { if (ps.state != 'Z') {
pr_err("Unseizeable non-zombie %d found, state %c, err %d/%d\n", if (pid == getpid())
pid, ps.state, ret, ptrace_errno); pr_err("The crtools itself is withing dumped tree.\n");
else
pr_err("Unseizeable non-zombie %d found, state %c, err %d/%d\n",
pid, ps.state, ret, ptrace_errno);
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