Messages in this thread | | | Subject | Re: [PATCH] ptrace on stopped processes (2.4) | From | OGAWA Hirofumi <> | Date | Thu, 24 Jan 2002 10:41:51 +0900 |
| |
vic <zandy@cs.wisc.edu> writes:
> > PTRACE_SYSCALL, PTRACE_CONT, and PTRACE_SINGLESTEP can't send a signal > > by the same reason. Please read the do_signal(). > > I've read that function, but I don't see why it would not get along > with my suggestion to send SIGKILL rather than set exit_code to > implement PTRACE_KILL. > > No doubt I can be rather thick; in this case, induction doesn't help me.
kill(pid, SIGKILL) != ptrace(PTRACE_KILL, pid, NULL, NULL).
Whether the same effect as kill() is required for PTRACE_KILL is the problem which is unrelated to this problem. If so, please argue on another thread.
And If PTRACE_SYSCALL, PTRACE_CONT, and PTRACE_SINGLESTEP can send the signal, PTRACE_KILL also work.
BTW, did you read my first email? What do you think of my suggestion?
In an example,
ptrace_attach(),
if (task->p_pptr != current) { REMOVE_LINKS(task); task->p_pptr = current; SET_LINKS(task); } write_unlock_irq(&tasklist_lock);
stopped = (task->state == TASK_STOPPED); send_sig(SIGSTOP, task, 1); if (stopped) wake_up_process(task);
return 0;
Note, this code isn't investigating at all. -- OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |