Xcode signal to end app
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
.
精彩评论