Home | History | Annotate | Download | only in init

Lines Matching refs:svc

48     struct service *svc;
58 svc = service_find_by_pid(pid);
59 if (!svc) {
64 NOTICE("process '%s', pid %d exited\n", svc->name, pid);
66 if (!(svc->flags & SVC_ONESHOT)) {
68 NOTICE("process '%s' killing any children in process group\n", svc->name);
72 for (si = svc->sockets; si; si = si->next) {
78 svc->pid = 0;
79 svc->flags &= (~SVC_RUNNING);
82 if (svc->flags & SVC_ONESHOT) {
83 svc->flags |= SVC_DISABLED;
87 if (svc->flags & (SVC_DISABLED | SVC_RESET) ) {
88 notify_service_state(svc->name, "stopped");
93 if (svc->flags & SVC_CRITICAL) {
94 if (svc->time_crashed + CRITICAL_CRASH_WINDOW >= now) {
95 if (++svc->nr_crashed > CRITICAL_CRASH_THRESHOLD) {
97 "rebooting into recovery mode\n", svc->name,
103 svc->time_crashed = now;
104 svc->nr_crashed = 1;
108 svc->flags |= SVC_RESTARTING;
111 list_for_each(node, &svc->onrestart.commands) {
115 notify_service_state(svc->name, "restarting");