summaryrefslogtreecommitdiffstats
path: root/init/init.h
diff options
context:
space:
mode:
authorMike Kasick <mike@kasick.org>2012-01-25 23:48:46 -0500
committerMike Kasick <mike@kasick.org>2012-03-22 22:25:17 -0400
commitb54f39fdd97c50e0e8dfa439722be0786f5e6f52 (patch)
tree2a5615f76942309532b1f3c31f28365902a6b559 /init/init.h
parent7e36edd80f23a5d34ce7b5b0fbe8ecfea061a826 (diff)
downloadsystem_core-b54f39fdd97c50e0e8dfa439722be0786f5e6f52.tar.gz
system_core-b54f39fdd97c50e0e8dfa439722be0786f5e6f52.tar.bz2
system_core-b54f39fdd97c50e0e8dfa439722be0786f5e6f52.zip
init: Retain traditional restart behavior for critical and oneshot services.
Adds an SVC_RESTART state that's used for an explicit "restart" of a running service. This retains the traditional restart behavior for critical and oneshot services (previously altered by 7e36edd8), whereby these services are "simply restarted" instead of counting as a crash (for a critical serivce) or going into the disabled state (for a oneshot service).
Diffstat (limited to 'init/init.h')
-rw-r--r--init/init.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/init/init.h b/init/init.h
index 58bbbfe9b..c20864ad3 100644
--- a/init/init.h
+++ b/init/init.h
@@ -72,6 +72,7 @@ struct svcenvinfo {
#define SVC_RESET 0x40 /* Use when stopping a process, but not disabling
so it can be restarted with its class */
#define SVC_RC_DISABLED 0x80 /* Remember if the disabled flag was set in the rc script */
+#define SVC_RESTART 0x100 /* Use to safely restart (stop, wait, start) a service */
#define NR_SVC_SUPP_GIDS 12 /* twelve supplementary groups */
@@ -129,6 +130,7 @@ void service_for_each_flags(unsigned matchflags,
void (*func)(struct service *svc));
void service_stop(struct service *svc);
void service_reset(struct service *svc);
+void service_restart(struct service *svc);
void service_start(struct service *svc, const char *dynamic_args);
void property_changed(const char *name, const char *value);