The usual solution, including in safety critical systems, is to give the judge of the halting problem a stopwatch and a gun.
For example in an embedded system: a watchdog timer that you don't service during the execution of some context. If you fail to complete your task within the time, the kernel or entire system is rebooted.
For example in a VM-like system, you give the code some amount of "fuel" or "budget", if it exceeds that budget, the process/tasklet/whatever is terminated by the VM.
It's not a general solution to the halting problem, but a practical one.