原因是ENOMEM from :: popen()

编程入门 行业动态 更新时间:2024-10-25 00:27:05
本文介绍了原因是ENOMEM from :: popen()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有一个应用程序,大多数工作,但我有一个条件,其中调用:: popen()得到一个错误与errno设置为ENOMEM。 :: popen()的手册页引用:: page()的页面,它本身列出了ENOMEM和Linux上的这个简短注释:

I have an application that mostly works, but am having one condition wherein the call to ::popen() gets an error with errno set to ENOMEM. The man page for ::popen() refers you to page for ::fork() which itself lists ENOMEM with this brief comment on Linux:

The fork() function may fail if: ENOMEM Insufficient storage space is available.

我想知道我是真的耗尽内存,还是像文件描述符这样的其他资源?可以fork()给ENOMEM以外的东西,而不是你的系统上的实际内存不足?这是Centos4。

I am wondering if I am really running out of memory, or perhaps some other resource like file descriptors? Can fork() give ENOMEM for something other than running out of actual memory on your system? This is Centos4.

推荐答案

我已经确认ENOMEM是由于没有调用:: pclose )并最终用完文件描述符。

I have confirmed that the ENOMEM resulted from not calling ::pclose() after repeated ::popen() and eventually running out of file descriptors.

更多推荐

原因是ENOMEM from :: popen()

本文发布于:2023-07-05 07:03:42,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1034457.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:原因   ENOMEM   popen

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!