Date: Sat, 19 Aug 2000 19:40:18 +0200 From: "Andi Kleen" <ak _at_ suse.de> On Sat, Aug 19, 2000 at 03:37:04PM +0200, Mark Kettenis wrote: > I once did a simple hack to solve that problem by adding a "VM > identifier" to the /proc file system. The identifiers were > just the in kernel addresses of the mm_struct. You do a > SIGSTOP and then just search /proc for other processes with > the same VM. > > And it would only work if the cloned processes are still sharing the > same process group, which ain't necessarily so. There are no restrictions regarding the process group. I thought you sent the initial SIGSTOP to the process group, and expected it to stop all possible interesting processes before searching /proc. Seems that's not what you were doing. > True, but it is certainly a common case that GDB is attached right > from the start. And even the vmid approach would benefit from > notifications of new threads created after the initial > attach. I don't think, constantly monitoring /proc for new threads is > a viable alternative. The alternative is to run a system call ptrace and look for clone and fork (and optimizing that by adding a syscall trace wakeup filter to the kernel). It actually works fine, I did that in the past. The filter is probably pretty essential to get adequate performance. I still think that my proposed change is cleaner. Mark - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo _at_ vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/
Follow-Ups:
- Re: CLONE_PTRACE"Andi Kleen" <ak _at_ suse.de>
- Re: CLONE_PTRACE"Andi Kleen" <ak _at_ suse.de>
- Prev by Date: Re: 2.4.0-test6 message queues problem with IBM DB2 V6.1 ?
- Next by Date: Re: CLONE_PTRACE
- Prev by thread: Re: CLONE_PTRACE
- Next by thread: Re: CLONE_PTRACE
- Indexes:[Main][Thread]