I have an iPhone application which will exit on it's own after a user completes a particular action. I currently use exit(0) to leave the application and I have had no troubles with it until recently. I understand that this isn't the "right" way to exit an application but it is something that I want to do. The issue I am having is when the device awakes from hibernation, with my application as the active one, exit(0) is called and the application would restart after exiting.
This strikes me as quite odd and am wondering if this is a bug or am I doing something wrong? Is there a better way to gracefully exit an application without having the user hit the home key?
Thanks