Lines Matching defs:service

152         unit_ref_unset(&s->service);
208 /* This fills in s->service if it isn't filled in yet. For
209 * Accept=yes sockets we create the next connection service
210 * here. For Accept=no this is mostly a NOP since the service
213 if (UNIT_DEREF(s->service))
223 if (asprintf(&name, "%s@%u.service", prefix, s->n_accepted) < 0)
231 unit_ref_set(&s->service, u);
332 if (!UNIT_DEREF(s->service)) {
335 r = unit_load_related_unit(u, ".service", &x);
339 unit_ref_set(&s->service, x);
342 r = unit_add_two_dependencies(u, UNIT_BEFORE, UNIT_TRIGGERS, UNIT_DEREF(s->service), true);
430 if (s->accept && UNIT_DEREF(s->service)) {
431 log_unit_error(UNIT(s), "Explicit service configuration for accepting socket units not supported. Refusing.");
1262 if (UNIT_ISSET(s->service) &&
1263 SERVICE(UNIT_DEREF(s->service))->exec_command[SERVICE_EXEC_START]) {
1264 r = mac_selinux_get_create_label_from_exe(SERVICE(UNIT_DEREF(s->service))->exec_command[SERVICE_EXEC_START]->path, &label);
1351 r = usbffs_write_descs(p->fd, SERVICE(UNIT_DEREF(s->service)));
1932 if (!UNIT_ISSET(s->service)) {
1938 r = manager_add_job(UNIT(s)->manager, JOB_START, UNIT_DEREF(s->service), JOB_REPLACE, &error, NULL);
1946 Service *service;
1973 r = unit_name_build(prefix, instance, ".service", &name);
1977 r = unit_add_name(UNIT_DEREF(s->service), name);
1981 service = SERVICE(UNIT_DEREF(s->service));
1982 unit_ref_unset(&s->service);
1985 UNIT(service)->no_gc = false;
1987 unit_choose_id(UNIT(service), name);
1989 r = service_set_socket_fd(service, cfd, s, s->selinux_context_from_net);
1996 r = manager_add_job(UNIT(s)->manager, JOB_START, UNIT(service), JOB_REPLACE, &error, NULL);
2007 log_unit_warning(UNIT(s), "Failed to queue service startup job (Maybe the service file is missing or not a %s unit?): %s",
2066 /* Cannot run this without the service being around */
2067 if (UNIT_ISSET(s->service)) {
2068 Service *service;
2070 service = SERVICE(UNIT_DEREF(s->service));
2072 if (UNIT(service)->load_state != UNIT_LOADED) {
2073 log_unit_error(u, "Socket service %s not loaded, refusing.", UNIT(service)->id);
2077 /* If the service is already active we cannot start the
2079 if (service->state != SERVICE_DEAD &&
2080 service->state != SERVICE_FAILED &&
2081 service->state != SERVICE_AUTO_RESTART) {
2082 log_unit_error(u, "Socket service %s already active, refusing.", UNIT(service)->id);
2455 log_unit_error(UNIT(p->socket), "Got POLLHUP on a listening socket. The service probably invoked shutdown() on it, and should better not do that.");
2660 /* Called from the service code for requesting our fds */
2706 /* The service is dead. Yay!
2723 /* Don't propagate state changes from the service if we are
2798 [SOCKET_FAILURE_SERVICE_START_LIMIT_HIT] = "service-start-limit-hit"