Topic summary
File descriptor

In Unix and Unix-likecomputeroperating systems, a file descriptor (FD, less frequently fildes) is a process-unique identifier (handle) for a file or other input/outputresource, such as a pipe or network socket.
File descriptors typically have non-negative integer values, with negative values being reserved to indicate "no value" or error conditions.
File descriptors are a part of the POSIXAPI. Each Unix process (except perhaps daemons) should have three standard POSIX file descriptors, corresponding to the three standard streams: