Re: PT_ATTACH resumes suspended process

2010-05-10 Thread Ben Widawsky
Looking at the sendsig label in sys_process.c:kern_ptrace() makes it clear what's happening - in your testing the process was already stopped so the code sets td_xsig to SIGSTOP and wakes it up to send it the signal. But td_xsig doesn't seem to be used anywhere to set pending signals.  Maybe

Re: PT_ATTACH resumes suspended process

2010-05-08 Thread Gary Jennejohn
On Fri, 7 May 2010 13:52:15 -0700 Ben Widawsky widaw...@gmail.com wrote: If a debugger attaches to a suspended process, the process will be resumed, and backgrounded. This seems like the incorrect behavior to me based what I read in the man page. The tracing process will see the newly-traced