Does anyone knows what signal Xcode sends to kill a running program? I need an handler to do some cleanup before the programs gets killed. I already tried SIGINT and SIGTERM but it doesn’t seem to work.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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.