in reply to Detect a hung process

Hi!,

If i understood well your post, you need to look into a program internals (stack, pc, etc) to ensure it has not hung. I also understand it is propietary software, orherwise it would be much easier to modify directly that program.

If this is right i would use directly a process or system call debugger running in top of your program, like ptrace or strace, to see what is happening during execution, and use its output to kill the process if something goes wrong.

You have a Perl interface to ptrace in CPAN. Hope this helps.