切换后台任务时SIGPIPE崩溃 [英] SIGPIPE crash when switching background task

查看:298
本文介绍了切换后台任务时SIGPIPE崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我将应用程式传送到背景,载入新应用程式,将装置切换至睡眠模式,唤醒装置,关闭新应用程式,然后从后台工作中开启我的应用程式时,我遇到了一个奇怪的问题。黑屏将出现,我不能退出此黑屏与主页按钮,并在调试器中显示此消息:

I'm experiencing a weird crash when sending my app into the background, loading a new app, switching the device into sleep mode, waking up the device, closing the new app and then opening my app from the background tasks. A black screen will appear and I cannot exit this black screen with the home button, and in the debugger I am shown this message:


程序接收信号:SIGPIPE。
数据格式化器不可用(错误
调用dlopen for:
/Developer/usr/lib/libXcodeDebuggerSupport.dylib:
dlopen(/ Developer / usr / lib / libXcodeDebuggerSupport。 dylib,
10):没有找到合适的图像
find:
/Developer/usr/lib/libXcodeDebuggerSupport.dylib:
out of address space
/ Developer /usr/lib/libXcodeDebuggerSupport.dylib:
stat()failed with errno = 868226285

Program received signal: "SIGPIPE". Data Formatters unavailable (Error calling dlopen for: "/Developer/usr/lib/libXcodeDebuggerSupport.dylib": "dlopen(/Developer/usr/lib/libXcodeDebuggerSupport.dylib, 10): no suitable image found. Did find: /Developer/usr/lib/libXcodeDebuggerSupport.dylib: out of address space /Developer/usr/lib/libXcodeDebuggerSupport.dylib: stat() failed with errno=868226285

推荐答案

通过在套接字上设置 SO_NOSIGPIPE setsockopt(),或忽略所有 SIGPIPE 信号:
信号(SIGPIPE,SIG_IGN)

Set SO_NOSIGPIPE on your socket via setsockopt(), or ignore all SIGPIPE signals with: signal(SIGPIPE, SIG_IGN).

这篇关于切换后台任务时SIGPIPE崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆