| 928 | } |
| 929 | |
| 930 | static bool host_runtime_stop_free(cbm_daemon_runtime_service_t *service) { |
| 931 | if (cbm_daemon_runtime_service_state(service) != CBM_DAEMON_RUNTIME_SERVICE_EXITED) { |
| 932 | if (!cbm_daemon_runtime_service_stop(service, HOST_RUNTIME_SHUTDOWN_MS)) { |
| 933 | cbm_log_error("daemon.shutdown_timeout", "component", "runtime"); |
| 934 | return false; |
| 935 | } |
| 936 | } |
| 937 | if (!cbm_daemon_runtime_service_free(service)) { |
| 938 | cbm_log_error("daemon.cleanup_timeout", "component", "runtime"); |
| 939 | return false; |
| 940 | } |
| 941 | return true; |
| 942 | } |
| 943 | |
| 944 | static _Noreturn void host_force_terminate(const char *component) { |
| 945 | /* The operation-log sink flushes every record before returning. Do not run |
no test coverage detected