I have 2 server programs that need to be run using the GNU screen. I would like to harden these servers from crashes using a Python-based program that starts every screen session and then controls the server process. If the server process crashes, I need python code to kill an extraneous screen session and restart the server using the screen again.
I am very new to python, but I use this opportunity to teach myself. I know this can be done in bash scripts. But I want to use this code for future functions, so it should be just python.
The pseudocode is as follows:
thread-one { While 1: start server 1 using screen wait for server to end end while } thread-two { While 1: start server 2 using screen wait for server to end end while }
source share