core: Add trigger limit for path units
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 17 Dec 2021 19:01:31 +0000 (20:01 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 11 Jan 2022 19:27:28 +0000 (20:27 +0100)
commit4c63c3b00aac56390a44e4c0a9d056426d6ff81d
tree490ccaf0edff3ee8e6ba01dc2aa8447a28f634a9
parent6a28f8b55904c818b25e4db2e1511faac79fd471
core: Add trigger limit for path units

When conditions fail on a service unit, a path unit can cause
PID 1 to busy loop as it keeps trying to activate the service unit.
To avoid this from happening, add a trigger limit to the path unit,
identical to the trigger limit we have for socket units.

Initially, let's start with a high limit and not make it configurable.
If needed, we can add properties to configure the rate limit similar
to the ones we have for socket units.

(cherry picked from commit aaae822b37aa3ca39aebb516fdc6bef36d730c25)
src/core/path.c
src/core/path.h