Make sure the process would not be restarted too frequently 39/300639/1
authorJi-hoon Lee <dalton.lee@samsung.com>
Thu, 30 Mar 2023 11:25:22 +0000 (20:25 +0900)
committerJi-hoon Lee <dalton.lee@samsung.com>
Mon, 30 Oct 2023 10:27:01 +0000 (19:27 +0900)
commitbe3dc97a55a11243011bb1bf769755a84e500ab2
tree635c32bd093003286e1d2b2444dfdaf6ce0d20dd
parent95bf2e65a8ff868d8bbe392522c18404079579dd
Make sure the process would not be restarted too frequently

If an auto-restart process gets restarted more than 5 times
in 10 seconds, it is considered to be an abnormal behavior
and will not be restarted automatically anymore.

For this reason, modified the app_restart() function to sleep
if the application tries to restart in less than 3 seconds
from the time it was launched.

Change-Id: I44bbb4d24bde28cf35f9927be3dc7bb8c7145f81
inc/service_main.h
src/service_main.cpp