Linux errno 23 和 Linux errno 24 的区别 [英] Difference between Linux errno 23 and Linux errno 24
问题描述
errno.h
中的这两个 linux 错误有什么区别?23 和 24
What is the difference between these 2 linux errors in
errno.h
? 23 and 24
我尝试了 2 个不同的网站,但无法理解两者之间的区别.
I tried 2 different sites but can't understand difference between the two.
[EMFILE]
Too many open files.
[ENFILE]
Too many files open in system.
<小时>
# define ENFILE 23 /* File table overflow */
# define EMFILE 24 /* Too many open files */
此外,我收到 errno 24 并且套接字调用在第 974 次失败.(AF_INET
UDP 数据报套接字)
Also, I am getting errno 24 and socket call failing at 974th time. (AF_INET
UDP datagram socket)
当我执行 cat/proc/sys/fs/file-max
时,我看到的值为 334076ulimit -n 显示 1024
When I did a cat /proc/sys/fs/file-max
I am seeing a value of 334076
ulimit -n showing 1024
知道可以做些什么来增加限制吗?
Any idea what can be done to increase limit?
推荐答案
对于 1) 两个错误码都是关于打开文件过多的情况.EMFILE 在您的进程中打开的文件太多.ENFILE是整个系统打开的文件太多.
For 1) Both error codes are about the situation with too many opened files. EMFILE is too many files opened in your process. ENFILE is too many files opened in the entire system.
这篇关于Linux errno 23 和 Linux errno 24 的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!