On reload/restart we must wait for services to stop first

This patch adds support for declaring *why* a service is being stopped
or reloaded.  This is later used when all stopped services have been
collected by the `service_monitor()` to issue start or postponed SIGHUP.

As an added benefit we can now also see why a service is not running.
If it has been paused by a user, halted when moving to another runlevel,
waiting for a condition (event), or similar.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson committed 2015-11-22 10:11:27 +01:00
1 parent b1d57d6828
commit 924bf041bc
9 files changed
+92 -36

No files matched your search

+1 -1
View File
@@ -212,7 +212,7 @@ void inetd_stop(inetd_t *inetd)
/* Stop any running service, not allowed anymore. */
if (svc->pid)
service_stop(svc);
service_stop(svc, SVC_WAITING_STATE);
}
static int getent(char *service, char *proto, struct servent **sv, struct protoent **pv)