| 2131 | } |
| 2132 | |
| 2133 | static _Noreturn void runtime_cleanup_fail_stop(const char *component) { |
| 2134 | /* Convenience start() has no outward cleanup handle on failure. Losing a |
| 2135 | * live participant guard would permit later code to misreport teardown, |
| 2136 | * so terminate the process and let the kernel release native ownership. */ |
| 2137 | cbm_log_error("daemon.forced_shutdown", "component", component); |
| 2138 | (void)fflush(stdout); |
| 2139 | (void)fflush(stderr); |
| 2140 | #ifdef _WIN32 |
| 2141 | (void)TerminateProcess(GetCurrentProcess(), EXIT_FAILURE); |
| 2142 | abort(); |
| 2143 | #else |
| 2144 | _Exit(EXIT_FAILURE); |
| 2145 | #endif |
| 2146 | } |
| 2147 | |
| 2148 | static void runtime_startup_lock_release_complete(cbm_daemon_ipc_startup_lock_t **lock_io, |
| 2149 | uint32_t timeout_ms) { |
no outgoing calls
no test coverage detected