ffb3de5522
fit what it does. The softsignal feature is used in Darwin to trace processes. When the traced process gets a signal, this raises an exception. The debugger will receive the exception message, use ptrace with PT_THUPDATE to pass the signal to the child or discard it, and then it will send a reply to the exception message, to resume the child. With the hook at the beginnng of kpsignal2, we are in the context of the signal sender, which can be the kill(1) command, for instance. We cannot afford to sleep until the debugger tells us if the signal should be delivered or not. Therefore, the hook to generate the Mach exception must be in the traced process context. That was we can sleep awaiting for the debugger opinion about the signal, this is not a problem. The hook is hence located into issignal, at the place where normally SIGCHILD is sent to the debugger, whereas the traced process is stopped. If the hook returns 0, we bypass thoses operations, the Mach exception mecanism will take care of notifying the debugger (through a Mach exception), and stop the faulting thread. |
||
---|---|---|
.. | ||
aout | ||
aoutm68k | ||
common | ||
darwin | ||
freebsd | ||
hpux | ||
ibcs2 | ||
irix | ||
linux | ||
m68k4k | ||
mach | ||
netbsd32 | ||
osf1 | ||
ossaudio | ||
pecoff | ||
sunos | ||
sunos32 | ||
svr4 | ||
svr4_32 | ||
ultrix | ||
vax1k | ||
Makefile |