Implement application watchdog timer
-
wrote on 15 Nov 2018, 12:01 last edited by
I need to implement application watch dog timer in Qt.
When application is hanged, need to restart the application.
How can i implement it in Qt.Any ideas, will be helpful.
Thanks in advance
-
I need to implement application watch dog timer in Qt.
When application is hanged, need to restart the application.
How can i implement it in Qt.Any ideas, will be helpful.
Thanks in advance
wrote on 15 Nov 2018, 13:25 last edited byYou can use QTimer to start on a regular basis your watch dog.
One thing you need to be careful of is the event loop. When your application is blocking from some mal-function within a slot routine started by the same event loop, you have lost. The event loop will have no chance to execute your watch dog event.
Either you are using an additional thread or an external application with some communication between those applications or other means to track the state of the application.
1/2