Phạm Khánh Đoan
New member
How do file descriptors work in Linux?
Answer
To the kernel, all open files are referred to by File Descriptors. A file descriptor is a non-negative number. When we
open an existing file or create a new file
, the kernel returns a file descriptor to the process. The kernel maintains a table of all open file descriptors, which are in use.
Answer
To the kernel, all open files are referred to by File Descriptors. A file descriptor is a non-negative number. When we
open an existing file or create a new file
, the kernel returns a file descriptor to the process. The kernel maintains a table of all open file descriptors, which are in use.