lkml.org 
[lkml]   [2002]   [Jan]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] ptrace on stopped processes (2.4)
From
Date
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/

\
 
 \ /
  Last update: 2005-03-22 13:15    [W:0.170 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site