What is the difference between these 2 linux errors in errno.h
? 23 and 24
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 */
Also, I am getting errno 24 and socket call failing at 974th time. (AF_INET
UDP datagram socket)
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?
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.