| 882 | } |
| 883 | |
| 884 | static bool host_runtime_stop_free(cbm_daemon_runtime_service_t *service) { |
| 885 | if (cbm_daemon_runtime_service_state(service) != CBM_DAEMON_RUNTIME_SERVICE_EXITED) { |
| 886 | if (!cbm_daemon_runtime_service_stop(service, HOST_RUNTIME_SHUTDOWN_MS)) { |
| 887 | cbm_log_error("daemon.shutdown_timeout", "component", "runtime"); |
| 888 | return false; |
| 889 | } |
| 890 | } |
| 891 | if (!cbm_daemon_runtime_service_free(service)) { |
| 892 | cbm_log_error("daemon.cleanup_timeout", "component", "runtime"); |
| 893 | return false; |
| 894 | } |
| 895 | return true; |
| 896 | } |
| 897 | |
| 898 | static _Noreturn void host_force_terminate(const char *component) { |
| 899 | /* The operation-log sink flushes every record before returning. Do not run |
no test coverage detected