Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get rid of SIGTERM error

i have been working on this iphone app in the new xcode4. Practically every time I exit my application in the simulator I get an error on a code line in the main.m Here is my line of code, and then the error on the next line

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

Thread 1:Program received signal: "SIGTERM".

What is happening here? How do I fix this?

like image 627
Blane Townsend Avatar asked Apr 17 '11 04:04

Blane Townsend


People also ask

Why do we get SIGTERM error?

The SIGTERM signal is a generic signal used to cause program termination. Unlike SIGKILL , this signal can be blocked, handled, and ignored. It is the normal way to politely ask a program to terminate. The shell command kill generates SIGTERM by default.

What does SIGTERM mean?

SIGTERM. (signal 15) is a request to the program to terminate. If the program has a signal handler for SIGTERM that does not actually terminate the application, this kill may have no effect. This is the default signal sent by kill.

What is SIGTERM in Python?

Python provides the Signal library allowing developers to catch Unix signals and set handlers for asynchronous events. For example, the 'SIGTERM' (Terminate) signal is received when issuing a 'kill' command for a given Unix process.

Who is sending SIGTERM?

SIGTERM is the signal that is typically used to administratively terminate a process. That's not a signal that the kernel would send, but that's the signal a process would typically send to terminate (gracefully) another process. That's the signal that is sent by default by the kill , pkill , killall ... commands.


1 Answers

SIGTERM is a Unix signal, used to tell your program to quit (TERMinate). When you run your program in Xcode, it runs it within gdb, the debugger program, which automatically catches certain signals. The signal handling behaviour of gdb can be controller but I'm just now myself researching how it's done so can't give you details. In the past, applications on Mac OS or iPhone were sent Apple Quit events, I think, but the SIGTERM signal may be used by the sudden termination feature recently added.

like image 59
Bored Astronaut Avatar answered Oct 18 '22 08:10

Bored Astronaut