| 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 |
| 900 | * ordinary teardown after the cooperative deadline: a callback thread may |
| 901 | * still own application storage. Process termination releases native |
| 902 | * locks, and supervised worker groups observe their daemon parent's death. */ |
| 903 | cbm_log_error("daemon.forced_shutdown", "component", component); |
| 904 | #ifdef _WIN32 |
| 905 | (void)TerminateProcess(GetCurrentProcess(), EXIT_FAILURE); |
| 906 | abort(); |
| 907 | #else |
| 908 | _exit(EXIT_FAILURE); |
| 909 | #endif |
| 910 | } |
| 911 | |
| 912 | _Noreturn void cbm_daemon_host_force_terminate_for_test(const char *component) { |
| 913 | char conflict_log[HOST_PATH_CAP]; |
no outgoing calls
no test coverage detected