Package Products :: Package ZenUtils :: Module Watchdog :: Class Watcher |
[hide private]
[frames] | no frames]

# Class Watcher

source code
Run the given command, and expect periodic input on a shared UNIX-domain socket. If the command does not connect to the socket in startTimeout seconds, or it does not report every cycleTimeout seconds, then the process is restarted. The Watchdog will increase the time-between restarts until maxTime is achieved

Instance Methods | [hide private]
__init__(self, socketPath, cmd, startTimeout=None, cycleTimeout=1, maxTime=30) | source code
_kill(self) Send a signal to a process and wait for it to stop. | source code
_readWait(self, sock, timeout) Wait for a file descriptor to become readable | source code
_runOnce(self) | source code
_stop(self, *unused) | source code
run(self) | source code

Method Details | [hide private]

### _kill(self) | source code
Send a signal to a process and wait for it to stop. Use progressively more serious signals to get it to stop.