lkml.org 
[lkml]   [2003]   [Feb]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectPtrace updates: CLONE_PTRACE should use force_sig_specific [3/5]
Right now, CLONE_PTRACE uses send_sig(SIGSTOP, p, 1).  If you use
CLONE_THREAD | CLONE_PTRACE, though, this SIGSTOP gets broadcast to the
entire thread group. That's not what was intended; we only want the one
new thread to stop. Fixed like so.

# --------------------------------------------
# 03/02/04 drow@nevyn.them.org 1.959
# Use force_sig_specific to send SIGSTOP to newly-created CLONE_PTRACE processes.
# --------------------------------------------

diff -Nru a/kernel/fork.c b/kernel/fork.c
--- a/kernel/fork.c Thu Feb 6 16:57:32 2003
+++ b/kernel/fork.c Thu Feb 6 16:57:32 2003
@@ -1036,7 +1036,7 @@
}

if (p->ptrace & PT_PTRACED)
- send_sig(SIGSTOP, p, 1);
+ force_sig_specific(SIGSTOP, p);

wake_up_forked_process(p); /* do this last */
++total_forks;
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
-
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:33    [W:0.037 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site