mirror of
https://github.com/troglobit/finit.git
synced 2026-11-20 19:41:51 +00:00
service: stop the restart counter of restart always from overflowing
The restart counter is a char, and with restart always nothing stops it. A service restarted more often than the counter ages wrapped it after 127 restarts, 255 on Arm. initctl status then showed a negative count and the back-off fell back to two seconds. Make the counter an int that stops at INT_MAX. With restart always it stops at 10, the default restart-max. The back-off peaks at half of that, and from 10 the counter ages back within the hour. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
3 files changed
+20
-7
No files matched your search
@@ -188,6 +188,10 @@ All relevant changes are documented in this file.
|
||||
- Fix a command whose name starts like a service option, e.g. `logger` or
|
||||
`pidof`. It was taken as the `log` or `pid` option and the next argument
|
||||
ran as the command, which also broke the `logger` example in finit.conf(5)
|
||||
- Fix the restart counter of a service with `restart = "always"`, nothing
|
||||
stopped it and it overflowed after 127 restarts, 255 on Arm. It now
|
||||
stops at 10, where the back-off has long since peaked, and ages from
|
||||
there
|
||||
- Fix `restart = "always"` skipping the initial two second delay between
|
||||
restarts, every restart waited five seconds
|
||||
- Reject a .conf file that declares the same block title twice. The title is
|
||||
|
||||
Reference in new issue
Block a user