Sample Header Ad - 728x90

Restart a process if a message is detected on stdout

1 vote
2 answers
274 views
Is there a way of monitoring a process (like for example with supervisord), and then restarting the process if the stdout outputs a specific line of text? In my case the line to check for would be: Net Exception [in file "src/ErrorHandler.cpp", line 38] If this line is put out on stdout, I would like the process to restart. Any help would be greatly appreciated.
Asked by Armand Jordaan (111 rep)
Feb 22, 2021, 04:03 PM
Last activity: Feb 23, 2021, 10:24 PM