This can be achieved by setting a global flag in the handler code and checking for the flag after completion of the critical part.
这可以通过在信号处理程序代码中设置一个全局标志并在完成关键部分的代码之后检查这个标志来实现。
2
However, in other cases the presence of a rule violation in ones code can be a red flag that something can go seriously awry at runtime, even if the compiler lets it slip by.