From: Davin McCall Date: Mon, 29 Oct 2018 12:17:51 +0000 (+0000) Subject: Improve comments / fix excessively long lines. X-Git-Tag: v0.5.0~42 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=a2b355e619d73758f994f36c17977bf759cf896a;p=oweals%2Fdinit.git Improve comments / fix excessively long lines. --- diff --git a/src/includes/service.h b/src/includes/service.h index 38c3098..e808677 100644 --- a/src/includes/service.h +++ b/src/includes/service.h @@ -221,9 +221,12 @@ class service_record private: string service_name; - service_type_t record_type; /* ServiceType::DUMMY, PROCESS, SCRIPTED, INTERNAL */ - service_state_t service_state = service_state_t::STOPPED; /* service_state_t::STOPPED, STARTING, STARTED, STOPPING */ - service_state_t desired_state = service_state_t::STOPPED; /* service_state_t::STOPPED / STARTED */ + service_type_t record_type; // service_type_t::DUMMY, PROCESS, SCRIPTED, or INTERNAL + + // 'service_state' can be any valid state: STARTED, STARTING, STOPPING, STOPPED. + // 'desired_state' is only set to final states: STARTED or STOPPED. + service_state_t service_state = service_state_t::STOPPED; + service_state_t desired_state = service_state_t::STOPPED; protected: string pid_file; @@ -237,7 +240,7 @@ class service_record bool pinned_stopped : 1; bool pinned_started : 1; - bool waiting_for_deps : 1; // if STARTING, whether we are waiting for dependencies (inc console) to start + bool waiting_for_deps : 1; // if STARTING, whether we are waiting for dependencies/console // if STOPPING, whether we are waiting for dependents to stop bool waiting_for_console : 1; // waiting for exclusive console access (while STARTING) bool have_console : 1; // whether we have exclusive console access (STARTING/STARTED) @@ -518,7 +521,8 @@ class service_record this->pid_file = std::move(pid_file); } - void set_socket_details(string &&socket_path, int socket_perms, uid_t socket_uid, uid_t socket_gid) noexcept + void set_socket_details(string &&socket_path, int socket_perms, uid_t socket_uid, uid_t socket_gid) + noexcept { this->socket_path = std::move(socket_path); this->socket_perms = socket_perms;