| 2487 | } |
| 2488 | |
| 2489 | static _Noreturn void runtime_cleanup_fail_stop(const char *component) { |
| 2490 | /* Convenience start() has no outward cleanup handle on failure. Losing a |
| 2491 | * live participant guard would permit later code to misreport teardown, |
| 2492 | * so terminate the process and let the kernel release native ownership. */ |
| 2493 | cbm_log_error("daemon.forced_shutdown", "component", component); |
| 2494 | (void)fflush(stdout); |
| 2495 | (void)fflush(stderr); |
| 2496 | #ifdef _WIN32 |
| 2497 | (void)TerminateProcess(GetCurrentProcess(), EXIT_FAILURE); |
| 2498 | abort(); |
| 2499 | #else |
| 2500 | _Exit(EXIT_FAILURE); |
| 2501 | #endif |
| 2502 | } |
| 2503 | |
| 2504 | static void runtime_startup_lock_release_complete(cbm_daemon_ipc_startup_lock_t **lock_io, |
| 2505 | uint32_t timeout_ms) { |
no test coverage detected