Re: ptrace and threads

From: Jeff Dike
Date: Wed Feb 15 2006 - 15:28:05 EST


On Wed, Feb 15, 2006 at 02:14:01PM -0500, Charles P. Wright wrote:
> I tried using
> ptrace(PTRACE_DETACH, ..., ..., SIGSTOP) in the original tracing process
> to stop the process after the fork, followed by a ptrace(PTRACE_ATTACH)
> in the new tracing process.

This has worked for me in the past. The one tricky bit is that the process
needs a SIGCONT before it will run again (and appear to be active under
the new tracer).

Jeff
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/