lkml.org 
[lkml]   [2004]   [Aug]   [31]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
DateMon, 30 Aug 2004 21:55:30 -0700
FromRoland McGrath <>
SubjectRe: [PATCH] cleanup ptrace stops and remove notify_parent
> 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.

Actually, I don't think it was broken at all.  It has an old kludge to
avoid considering trace-stopped threads as stopped for purposes of deciding
to generate signals for an orphaned process group.  I think that the useful
thing is for it not to consider any TASK_TRACED thread as stopped here either.
That's what it will already do, and the old kludge can go now:

--- linux-2.6-ptracefix/kernel/exit.c.~1~
+++ linux-2.6-ptracefix/kernel/exit.c
@@ -199,17 +199,6 @@ static inline int has_stopped_jobs(int p
 	for_each_task_pid(pgrp, PIDTYPE_PGID, p, l, pid) {
 		if (p->state != TASK_STOPPED)
 			continue;
-
-		/* If p is stopped by a debugger on a signal that won't
-		   stop it, then don't count p as stopped.  This isn't
-		   perfect but it's a good approximation.  */
-		if (unlikely (p->ptrace)
-		    && p->exit_code != SIGSTOP
-		    && p->exit_code != SIGTSTP
-		    && p->exit_code != SIGTTOU
-		    && p->exit_code != SIGTTIN)
-			continue;
-
 		retval = 1;
 		break;
 	}

Thanks,
Roland
-
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