You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

My iPhone Simulator causes SIGTERM when I quit it after clicking Home button.

Xcode Version 4.1 Build 4B110 (I got this from Mac App Store and it's running on 10.7 mid 2011 MBA.)


  1. Create new iOS iPhone View-based project
  2. Build and run in iPhone Simulator
  3. Click the home button in Simulator
  4. Quit the Simulator


Xcode pauses the project and says:


Thread 1: Program received signal: "SIGTERM".


in main.m for this line of code:


int retVal = UIApplicationMain(argc, argv, nil, nil);


I am not sure of this but I don't recall getting this behavior. I found that If I quit the Simulator while my program is active then everything is ok.


I'm wondering if others experience this also.


Thanks!

iOS 4.3

Posted on Aug 12, 2011 1:40 PM

Reply
3 replies

Oct 9, 2011 4:47 AM in response to jcArcs

Same behavior here, me too I don't recall this behavior happening before. Googling around I found that if I press the home button while the app is still in the foreground I don't get the SIGTERM and I get a clean exit as follows:


GNU gdb 6.3.50-20050815 (Apple version gdb-1705) (Fri Jul 1 10:50:06 UTC 2011)

Copyright 2004 Free Software Foundation, Inc.

GDB is free software, covered by the GNU General Public License, and you are

welcome to change it and/or distribute copies of it under certain conditions.

Type "show copying" to see the conditions.

There is absolutely no warranty for GDB. Type "show warranty" for details.

This GDB was configured as "x86_64-apple-darwin".sharedlibrary apply-load-rules all

Attaching to process 1098.

Pending breakpoint 1 - ""....":108" resolved

Terminating in response to SpringBoard's termination.

Program ended with exit code: 0

Oct 16, 2011 9:03 PM in response to langfromwangjing

Another solution that I found, also to the problem of leaving a lot of defunct (dead/zombie processes from the simulator behind) is to _not_ quit the simulator.

Press the Run button..simulator starts with the app inside, play with it back and forth then hit the home button to send it to the background (at this point the app is still running), at this point I do not quit the simulator, but rather hit the stop button in Xcode, this quits the app cleanly, returns with exit code 0, but leaves the simulator up.

My iPhone Simulator causes SIGTERM when I quit it after clicking Home button.

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.