I am using jabber bot written in python to log some MUC talks. Sometimes it drops on some network or XMPP problems. In this case I have to start it again by myself. The goal is to make it "self-respawning".
I have some variants about how to do it.
- Bot is one process. Another process monitors its activity and starts it if bot died.
- Main process spawns bot subprocess and controls it.
Also I think daemonizing bot process is useful here. Platform is Linux, as you could guess.
What is the right way to solve this problem?