Trying to Automatically Kill Hanging Programs on Windows Using Perl
One of the things that occasionally causes services on CTDATA's Web Sites to fail is a program that occasionally fails to finish running on one of our Windows NT 4 servers. We have spent a while trying to debug this, only to leave ourselves frustrated because the problem is so infrequent.
In order to improve our uptime, we are looking for ways to write an NT service that will kill processes by certain names that have run for an abnormally long time. Research on the Web has uncovered a brief thread on PerlMonks.com which discusses the writing such a service. Since no one bothered to contribute a code snippet to the thread, we will try to produce something generic, once we have solved our own problem.