Fix #279: allow restart:always, restart:-1, of crashing services

This change allows endless restarts, similar to `respawn` but honors
`restart_sec`.  There is no upper limit on the number of times Finit
tries to restart a crashing service.  Same as `restart:-1`

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg committed 2022-06-12 22:48:12 +02:00
1 parent f50b5a4ac6
commit f8dfcdf024
4 files changed
+10 -2

No files matched your search

+1 -1
View File
@@ -139,7 +139,7 @@ typedef struct svc {
/* Counters */
char once; /* run/task, (at least) once per runlevel */
unsigned int restart_tot; /* Total restarts ever, summarized, including `initctl restart` */
unsigned char restart_max; /* Maximum number of restarts allowed */
int restart_max; /* Maximum number of restarts allowed */
int restart_tmo; /* Time required for the service to start. */
unsigned char oncrash_action; /* Action to perform in crashed state. */
char respawn; /* ttys, or services with `respawn`, never increment restart_cnt */