diff options
author | David Oberhollenzer <goliath@infraroot.at> | 2019-03-25 17:16:34 +0100 |
---|---|---|
committer | David Oberhollenzer <goliath@infraroot.at> | 2019-03-29 21:00:53 +0100 |
commit | 028394b8a5c6745bbf3ee34ba71d148bca75d247 (patch) | |
tree | 424e21815a67957eae37bd401022afbed70e14a9 /initd/signal_linux.c | |
parent | 6fa0393be46b1bfdad79643d73d6e54f2df4997c (diff) |
Add service configuration reloading
This commit add the ability to initd to reload the service configuration
while running. The new configuration is merged with the existing one as
follows:
For each target:
- If the existing service list is not NULL, we have not started that
target yet. Simply replace it with the new list.
- If it is NULL, the services have already been started.
- First, remove all entries for services in that target that no
loner exist (except from the 'running' list).
- Second, add new services that we don't have yet. Treat them as
recently diseased and let the user start them manualy.
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
Diffstat (limited to 'initd/signal_linux.c')
-rw-r--r-- | initd/signal_linux.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/initd/signal_linux.c b/initd/signal_linux.c index bb9d339..b19d715 100644 --- a/initd/signal_linux.c +++ b/initd/signal_linux.c @@ -19,6 +19,7 @@ int sigsetup(void) sigaddset(&mask, SIGINT); sigaddset(&mask, SIGTERM); sigaddset(&mask, SIGUSR1); + sigaddset(&mask, SIGHUP); sfd = signalfd(-1, &mask, SFD_CLOEXEC); if (sfd == -1) { |