diff options
author | kib <kib@FreeBSD.org> | 2011-09-27 13:17:02 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2011-09-27 13:17:02 +0000 |
commit | f15c4ba986df76cc39987971217719f5ec3b4b06 (patch) | |
tree | 711070f981692411dd89024c8710f37e0b59b824 /sys/kern/kern_exec.c | |
parent | d0ef05f990765cb66af8de8ba973b3faff909d46 (diff) | |
download | FreeBSD-src-f15c4ba986df76cc39987971217719f5ec3b4b06.zip FreeBSD-src-f15c4ba986df76cc39987971217719f5ec3b4b06.tar.gz |
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
Diffstat (limited to 'sys/kern/kern_exec.c')
-rw-r--r-- | sys/kern/kern_exec.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index fe01142..4545848 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; |