diff options
author | Mike Kasick <mike@kasick.org> | 2012-01-25 23:48:46 -0500 |
---|---|---|
committer | Mike Kasick <mike@kasick.org> | 2012-03-22 22:25:17 -0400 |
commit | b54f39fdd97c50e0e8dfa439722be0786f5e6f52 (patch) | |
tree | 2a5615f76942309532b1f3c31f28365902a6b559 /init/init.h | |
parent | 7e36edd80f23a5d34ce7b5b0fbe8ecfea061a826 (diff) | |
download | system_core-b54f39fdd97c50e0e8dfa439722be0786f5e6f52.zip system_core-b54f39fdd97c50e0e8dfa439722be0786f5e6f52.tar.gz system_core-b54f39fdd97c50e0e8dfa439722be0786f5e6f52.tar.bz2 |
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.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/init/init.h b/init/init.h index 58bbbfe..c20864a 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); |