lkml.org 
[lkml]   [2004]   [Aug]   [31]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateTue, 31 Aug 2004 00:22:06 -0400
FromDaniel Jacobowitz <>
SubjectRe: [PATCH] cleanup ptrace stops and remove notify_parent
On Mon, Aug 30, 2004 at 08:25:46PM -0700, Roland McGrath wrote:
> This patch is against Linus's current tree.
> 
> This adds a new state TASK_TRACED that is used in place of TASK_STOPPED
> when a thread stops because it is ptraced.  Now ptrace operations are only
> permitted when the target is in TASK_TRACED state, not in TASK_STOPPED.
> This means that if a process is stopped normally by a job control signal
> and then you PTRACE_ATTACH to it, you will have to send it a SIGCONT before
> you can do any ptrace operations on it.  (The SIGCONT will be reported to
> ptrace and then you can discard it instead of passing it through when you
> call PTRACE_CONT et al.)
> 
> If a traced child gets orphaned while in TASK_TRACED state, it morphs into
> TASK_STOPPED state.  This makes it again possible to resume or destroy the
> process with SIGCONT or SIGKILL.

Nice.

Unless it's been changed since I last pulled, you should also fix up
has_stopped_jobs.  I think it's broken by the introduction of
TASK_TRACED.

-- 
Daniel Jacobowitz
-
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 14:05    [from the cache]
©2003-2008