最佳答案
当程序接收到终止信号时,如何处理清除?
For instance, there is an application I connect to that wants any third party app (my app) to send a finish command when logging out. What is the best say to send that finish command when my app has been destroyed with a kill -9?
编辑1: kill-9不能被捕获。谢谢你们纠正我。
编辑2: 我猜想这种情况是当一个调用刚刚杀死,这是相同的 ctrl-c