mirror of
https://github.com/troglobit/finit.git
synced 2026-11-20 19:41:51 +00:00
service: don't take a command named like an option for one
A run/task/service whose command starts like an option without a ':'
lost its command, e.g. the example in finit.conf(5):
run [2345] @joe:users logger "Hello world"
was registered as the log option, running "Hello world". Same for
pidof, pidproxy, and cgroupfs-mount.
The option parser matches with MATCH_CMD(), a prefix match, also for
the options with no trailing ':' to end the prefix: log, pid, cgroup,
respawn, nowarn, and the rest.
Match these against the whole token, allowing only the separator that
starts a value: "log:", "pid:", "cgroup." and "cgroup:".
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
(cherry picked from commit f15e95d1cc)
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
4 files changed
+58
-9
No files matched your search
@@ -30,6 +30,10 @@ All relevant changes are documented in this file.
|
||||
- Fix `initctl stop` of a forking service before it had written its
|
||||
PID file. The PID file showing up later undid the stop and the
|
||||
service was reported running. Now the late daemon is stopped instead
|
||||
- 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)
|
||||
- Remove stale daemon-owned (`pid:!`) pidfiles after unclean exits.
|
||||
When a daemon dies via SIGKILL/OOM/segfault, or exits early during
|
||||
startup, its pidfile lingers and can prevent the next instance from
|
||||
|
||||
Reference in new issue
Block a user