Hey,

I'm looking a way to programmatically attach to a process and monitor it for exceptional conditions/signals etc. Basically the functionality of gdb but in the form of a library. I'm remotely testing programs and if the SIGSEGV or whatever I want to be able to log it and restart the program. There's pydbg for this kind of stuff on Windows but I can't seem to find anyway to do it properly on linux.

I could use the 'trap' program but to be honest that's far from ideal.

Cheers,
nnp