开发者

Xcode signal to end app

开发者 https://www.devze.com 2023-03-13 18:35 出处:网络
Does anyone knows what signal Xcode sends to kill a running program? I need an handler to do some cle开发者_Python百科anup before the programs gets killed. I already tried SIGINT and SIGTERM but it do

Does anyone knows what signal Xcode sends to kill a running program? I need an handler to do some cle开发者_Python百科anup before the programs gets killed. I already tried SIGINT and SIGTERM but it doesn't seem to work.


It sends sinal SIGKILL. To verify you can open any application in debug mode and check the console when you stop the task.

However if it is kill -9 you cannot trap the signal.

What kind of clean up you want to do? I don't think there is any need to handle that event as you are doing it on purpose from XCode. If you are trying to send this signal to a process from outside Xcode like Terminal then in makes sense.


You shouldn't do that.

Use the appropriate delegate methods of your AppDelegate.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号