Application monitor

Magnus Lycka lycka at carmen.se
Wed Nov 9 12:17:54 EST 2005


Daniel Crespo wrote:
> Respect Twisted... Mmm... I already started with another networking
> library (TCPServer and SimpleXMLRPCServer), and I wouldn't like to mix
> things because I don't know so much about those libraries. I know that
> Twisted can do what I already have. But replacing it can be a hard
> task. So I would like to have a function like FindPID(exename) --> PID,
> or something more generic that could tell me the PID of a running
> program, and kill him in a certain moment.

You *could* use twisted.runner for process control even if you
don't use twisted for your networking code. It does seem like
a funny thing to do, but there's nothing stopping you from doing
that. The example code in twisted.runner starts up a few shell
scripts that die on their own accord, and make sure they get
restarted, so it doesn't rely on twisted being used in the
processes it controls.



More information about the Python-list mailing list