Dead Man Timer?
graham at effectif.com
Mon Aug 26 19:48:01 CEST 2002
On Sat, 31 Aug 2002 17:02:03 +0000, Neil Everhart wrote:
> Need to detect a stalled process.
> I am using python to telnet to a terminal server. The ports of the terminal
> server are connected to console ports. My code works great as long as the
> cable from the terminal server port to the console port is in place and the
> console is alive.
There may be a better way, but you could try using signal.alarm() to set
an alarm. Your process should be interrupted by a signal when it is
received. If your write operation works you can cancel the alarm
This will probably work much better on *nix than on windows (for which
there will be better alternatives, I'm sure).
More information about the Python-list