X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fcore%2Fservice.c;h=593946e5172e61517a8d7870fb7763857ae816d3;hp=9e46dbae9478b7aab8177018c395da2e8cd3f68e;hb=6d594baa3fa3a361efc2a4c1da3557fc4eba960d;hpb=464876c9c410b2f5bb997259510a13d0ee7d0af0 diff --git a/src/core/service.c b/src/core/service.c index 9e46dbae9..593946e51 100644 --- a/src/core/service.c +++ b/src/core/service.c @@ -1550,7 +1550,7 @@ static void service_set_state(Service *s, ServiceState state) { service_connection_unref(s); } - if (state == SERVICE_STOP) + if (state == SERVICE_STOP || state == SERVICE_STOP_SIGTERM) service_stop_watchdog(s); /* For the inactive states unit_notify() will trim the cgroup, @@ -2939,13 +2939,13 @@ static void service_sigchld_event(Unit *u, pid_t pid, int code, int status) { f = SERVICE_SUCCESS; } - log_struct(f == SERVICE_SUCCESS ? LOG_DEBUG : LOG_NOTICE, + log_struct_unit(f == SERVICE_SUCCESS ? LOG_DEBUG : LOG_NOTICE, + u->id, "MESSAGE=%s: main process exited, code=%s, status=%i/%s", u->id, sigchld_code_to_string(code), status, strna(code == CLD_EXITED ? exit_status_to_string(status, EXIT_STATUS_FULL) : signal_to_string(status)), - "UNIT=%s", u->id, "EXIT_CODE=%s", sigchld_code_to_string(code), "EXIT_STATUS=%i", status, NULL); @@ -3832,13 +3832,15 @@ DEFINE_STRING_TABLE_LOOKUP(start_limit_action, StartLimitAction); const UnitVTable service_vtable = { .object_size = sizeof(Service), - .exec_context_offset = offsetof(Service, exec_context), .sections = "Unit\0" "Service\0" "Install\0", + .exec_context_offset = offsetof(Service, exec_context), + .exec_section = "Service", + .init = service_init, .done = service_done, .load = service_load,