DragonFly-184.108.40.2066.ge473f master sys/kern kern_sig.c sys/platform/pc32/i386 trap.c sys/platform/pc64/amd64 trap.c sys/platform/vkernel/i386 trap.c sys/sys signal2.h signalvar.h
corecode at crater.dragonflybsd.org
Mon Mar 9 10:13:29 PDT 2009
Author: Simon Schubert <corecode at dragonflybsd.org>
Date: Sat Mar 7 18:09:13 2009 +0100
signals: rework when CURSIG/issignal can stop a thread for tracing
When tracing a process, it can happen that the thread would get stopped
due to the signal and its tracing. In this case the tracing parent
would get notified and it might choose to let the process to serve the
However if this stop+trace is happening somewhere deep in the kernel due
to a call to CURSIG(), it might happen that the same signal again is the
cause for a stop+trace cycle because of another call to CURSIG() while
the call stack is unwinding.
Introduce CURSIG_TRACE(), which explicitly allows stopping for tracing
signal delivery. This is only called from userret().
All other instances of CURSIG() may still block/sleep because of SA_STOP
signals, but these invocations may not trace + repost signals.
As such, the only place where trace + repost of signals can happen now
is userret(). Nevertheless, CURSIG() still decides not to ignore a
currently ignored signal and rather lets the kernel unwind until this
signal arrives in the CURSIG_TRACE() called from userret().
Summary of changes:
sys/kern/kern_sig.c | 16 ++++++++++------
sys/platform/pc32/i386/trap.c | 2 +-
sys/platform/pc64/amd64/trap.c | 2 +-
sys/platform/vkernel/i386/trap.c | 2 +-
sys/sys/signal2.h | 7 ++++---
sys/sys/signalvar.h | 2 +-
6 files changed, 18 insertions(+), 13 deletions(-)
DragonFly BSD source repository
More information about the Commits