“GLib-ERROR **: Cannot create pipe main loop wake-up: Too many open files” on Qt

▼魔方 西西 提交于 2019-12-22 18:48:22

问题


I am working on Ubuntu. When I run my program about after 1 hour I received this error :

GLib-ERROR **: Cannot create pipe main loop wake-up: Too many open files The program has unexpectedly finished.

When I run with gdb it does not crash.

I Don't understand why? and What is the reason for this error ?

Thank you very much..


回答1:


Too many open files

Is pretty obvious. Probalby you have a leak with file descriptors, so you should check if your code opens lots of files/filedescriptors but doesn't close them properly. If you fork a process, you should also consider to close them, before you start the actual process, as this might also be a common mistake.

The operating system has a limited table of how many filedescreptors it can maintain, and apparently you exceeded this limit.



来源:https://stackoverflow.com/questions/17969804/glib-error-cannot-create-pipe-main-loop-wake-up-too-many-open-files-on-qt

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!