public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* sigsuspend() and ptrace()
@ 2005-11-04  8:57 Greg
  2005-11-19  4:22 ` Daniel Jacobowitz
  0 siblings, 1 reply; 3+ messages in thread
From: Greg @ 2005-11-04  8:57 UTC (permalink / raw)
  To: linux-kernel

Hi,

My program uses gdb to attach to a process and make it execute a specific
function thanks to the gdb 'call' command. This works quite well unless the
attached process is sleeping in sigsuspend(). I peeked into the kernel sources
and saw that the typical sigsuspend() implementation is like this :

while (1) {
	schedule();
	if (do_signal())
		return -EINTR;
}

When using ptrace attach, the target process receives a SIGSTOP but there
isn't *of course* any handler to SIGSTOP. And no way for the process to return
to userland... is it implemented that way on purpose ? How can I make suspending
processes do some *alternative* work with gdb ?

Thanks.

Greg.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-11-23 20:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-04  8:57 sigsuspend() and ptrace() Greg
2005-11-19  4:22 ` Daniel Jacobowitz
2005-11-23 20:23   ` Greg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox