如何摆脱 SIGTERM 错误

发布于 2024-11-02 00:55:20 字数 220 浏览 9 评论 0原文

我一直在新的 xcode4 中开发这个 iphone 应用程序。实际上,每次我在模拟器中退出应用程序时,我都会在 main.m 中的代码行上收到错误,这是我的代码行,然后下一行出现错误

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

线程1:程序收到信号:“SIGTERM”。

这里发生了什么?我该如何解决这个问题?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

压抑⊿情绪 2024-11-09 00:55:20

SIGTERM 是一个 Unix 信号,用于告诉你的程序退出(TER​​Minate)。当您在 Xcode 中运行程序时,它会在 gdb(调试器程序)中运行,它会自动捕获某些信号。 gdb 的信号处理行为可以是控制器,但我现在正在研究它是如何完成的,因此无法向您提供详细信息。我认为,过去 Mac OS 或 iPhone 上的应用程序会发送 Apple Quit 事件,但最近添加的突然终止功能可能会使用 SIGTERM 信号。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文