Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between Linux errno 23 and Linux errno 24

  1. 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 */
    

  2. 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?

like image 223
badri Avatar asked Jul 21 '14 10:07

badri


People also ask

What errno 24?

OSError: [Errno 24] Too many open files. Traceback (most recent call last): File "/usr/lib/python3.6/weakref.py", line 624, in _exitfunc.

What is errno in Linux?

Errno is a value that you get when the command you run returns the value of the call indicating an error. There is a header file that defines the integer variable errno, which is set by the system calls and some library function in the event of an error to let the developer know what's wrong.

What does errno 1 mean?

The errno(1) command can also be used to look up individual error numbers and names, and to search for errors using strings from the error description, as in the following examples: $ errno 2 ENOENT 2 No such file or directory $ errno ESRCH ESRCH 3 No such process $ errno -s permission EACCES 13 Permission denied List ...

What is errno what is it for how is it used?

errno is a preprocessor macro used for error indication. It expands to a static (until C++11) thread-local (since C++11) modifiable lvalue of type int. Several standard library functions indicate errors by writing positive integers to errno .


1 Answers

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.

like image 105
Wojtek Surowka Avatar answered Sep 18 '22 21:09

Wojtek Surowka