Watchdog thread

Jeremy Fowler jfowler at westrope.com
Thu Dec 12 21:56:16 CST 2002


> Warning! Application XXX has caused an invalid page fault in module EMM386.
> Press any key to terminate this program.

? That's Windows. What does that have to do with threaded programs?

> Isn't general programming practice to not write such a 'watchdog'
> thread? If the
> code to said 'watched' thread is out of your control, you could just write a
> Perl script to monitor it. If it's under your control, wouldn't you
> want to just
> resolve the freezing/locking?

Watchdog threads are very common for multithreaded applications. I don't think
it's possible for one process to access another processes' threads. You can
control processes, but not threads. Kernel threads are different and so it may
be possible to modify/control those. I'll have to do more research into POSIX
threads to be sure though. I have O'Reilly book on this very subject - however,
it's at home and so I can't reference it right now.

> Just an honest question.

Is there such a thing as a dishonest question?




More information about the Kclug mailing list