]> Kevux Git Server - fll/commit
Update: implement with pid execution, simplify related rules.
authorKevin Day <thekevinday@gmail.com>
Sat, 17 Apr 2021 23:44:52 +0000 (18:44 -0500)
committerKevin Day <thekevinday@gmail.com>
Sun, 18 Apr 2021 00:14:29 +0000 (19:14 -0500)
commitdba1a6e31854be4f60716a7126e96a9f882cb600
treed1a46b19cf9c311e568c5b78b19be1e9e43c6fb0
parent3ec257aecac98c57132a29a42223624e24d6f9cb
Update: implement with pid execution, simplify related rules.

Implement the with pid execution.
This expects the process to be spawned in the background.

After some review, I decided to remove "use" and "create", replacing those with "pid_file".
The reasons are:
- For "use", the spawned service manages the pid file, so it would be overly complicated to try and manage it in addition to the spawned service.
- For "create", if the process is to go into the background, in order to manage it then there would still need to be a running process (this defeats the purpose).

When the termination signal is received, then inform any background process spawned by the controller program to exit, based on the existence of the pid file.
16 files changed:
level_3/controller/c/private-common.c
level_3/controller/c/private-common.h
level_3/controller/c/private-controller.c
level_3/controller/c/private-controller.h
level_3/controller/c/private-rule.c
level_3/controller/c/private-rule.h
level_3/controller/c/private-thread.c
level_3/controller/data/settings/example/rules/service/sshd.rule
level_3/controller/data/settings/example/rules/utility/sleeper_1.rule
level_3/controller/data/settings/example/rules/utility/sleeper_2.rule
level_3/controller/data/settings/rules/program/terminal.rule
level_3/controller/data/settings/rules/service/dbus.rule
level_3/controller/data/settings/rules/service/logger.rule
level_3/controller/data/settings/rules/service/mouse.rule
level_3/controller/documents/rule.txt
level_3/controller/specifications/rule.txt