aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/kern_exec.c
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2011-09-27 13:17:02 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2011-09-27 13:17:02 +0000
commitce8bd78b2aec7eb6ee3fb1e5bdb04c3a2f5b412d (patch)
tree711070f981692411dd89024c8710f37e0b59b824 /sys/kern/kern_exec.c
parenta01fdfcef1f44a622ab88ba88cfe55dc29a62d63 (diff)
downloadsrc-ce8bd78b2aec7eb6ee3fb1e5bdb04c3a2f5b412d.tar.gz
src-ce8bd78b2aec7eb6ee3fb1e5bdb04c3a2f5b412d.zip
Do not deliver SIGTRAP on exec as the normal signal, use ptracestop() on
syscall exit path. Otherwise, if SIGTRAP is ignored, that tdsendsignal() do not want to deliver the signal, and debugger never get a notification of exec. Found and tested by: Anton Yuzhaninov <citrin citrin ru> Discussed with: jhb MFC after: 2 weeks
Notes
Notes: svn path=/head/; revision=225791
Diffstat (limited to 'sys/kern/kern_exec.c')
-rw-r--r--sys/kern/kern_exec.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c
index fe0114237ada..4545848b6e85 100644
--- a/sys/kern/kern_exec.c
+++ b/sys/kern/kern_exec.c
@@ -777,16 +777,6 @@ interpret:
KNOTE_LOCKED(&p->p_klist, NOTE_EXEC);
p->p_flag &= ~P_INEXEC;
- /*
- * If tracing the process, trap to the debugger so that
- * breakpoints can be set before the program executes. We
- * have to use tdsignal() to deliver the signal to the current
- * thread since any other threads in this process will exit if
- * execve() succeeds.
- */
- if (p->p_flag & P_TRACED)
- tdsignal(td, SIGTRAP);
-
/* clear "fork but no exec" flag, as we _are_ execing */
p->p_acflag &= ~AFORK;