简体   繁体   English

如何摆脱SIGTERM错误

[英]How to get rid of SIGTERM error

i have been working on this iphone app in the new xcode4. 我一直在使用新的xcode4开发此iPhone应用程序。 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 实际上,每次我在模拟器中退出应用程序时,都会在main.m的代码行上遇到错误,这是我的代码行,然后在下一行出现错误

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

Thread 1:Program received signal: "SIGTERM". 线程1:程序收到信号:“ SIGTERM”。

What is happening here? 这是怎么回事 How do I fix this? 我该如何解决?

SIGTERM is a Unix signal, used to tell your program to quit (TERMinate). SIGTERM是Unix信号,用于告诉您的程序退出(TER​​Minate)。 When you run your program in Xcode, it runs it within gdb, the debugger program, which automatically catches certain signals. 当您在Xcode中运行程序时,它将在调试器程序gdb中运行,该程序会自动捕获某些信号。 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. gdb的信号处理行为可以是控制器,但我现在只是自己研究如何做,因此无法提供详细信息。 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. 我认为,过去曾在Mac OS或iPhone上向应用程序发送过Apple Quit事件,但最近添加的突然终止功能可能会使用SIGTERM信号。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM