In Unix and Unix-like computer operating systems, a file descriptor (FD, less frequently fildes) is a process-unique identifier (handle) for a file or other input/output resource, 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 POSIX API. Each Unix process (except perhaps daemons) should have three standard POSIX file descriptors, corresponding to the three standard streams:
Integer value
Name
<unistd.h> symbolic constant[1]
<stdio.h> file stream[2]
0
Standard input
STDIN_FILENO
stdin
1
Standard output
STDOUT_FILENO
stdout
2
Standard error
STDERR_FILENO
stderr
^The Open Group. "The Open Group Base Specifications Issue 7, IEEE Std 1003.1-2008, 2016 Edition". Retrieved 2017-09-21.
^The Open Group. "The Open Group Base Specifications Issue 7, IEEE Std 1003.1-2008, 2016 Edition". <stdio.h>. Retrieved 2017-09-21.
computer operating systems, a filedescriptor (FD, less frequently fildes) is a process-unique identifier (handle) for a file or other input/output resource...
Media DescriptorFile (MDF) is a proprietary disc image file format developed for Alcohol 120%, an optical disc authoring program. Daemon Tools, CDemu...
The Binary FileDescriptor library (BFD) is the GNU Project's main mechanism for the portable manipulation of object files in a variety of formats. As...
File descriptor, an abstract key for accessing a file In chemistry: Molecular descriptor, which helps characterize a chemical compound Descriptor (chemistry)...
The first 16 sectors of the file system are empty and reserved for other uses. The rest begins with a volume descriptor set (a header block which describes...
communication path. The Berkeley sockets API represents it as a filedescriptor (file handle) in the Unix philosophy that provides a common interface...
the process's standard streams. /dev/fd/n – accesses the process's filedescriptor n. Additionally, BSD-specific pseudo-devices with an ioctl interface...
counter-intuitive. All fcntl locks associated with a file for a given process are removed when any filedescriptor for that file is closed by that process, even if a...
The filedescriptor for standard output is 1 (one); the POSIX <unistd.h> definition is STDOUT_FILENO; the corresponding C <stdio.h> variable is FILE* stdout;...
achieved using file I/O, with the target identified by a filedescriptor. The select and poll system calls allow a set of filedescriptors to be monitored...
Versions of DOS before 3.2 totally or partially relied on the media descriptor byte in the BPB or the FAT ID byte in cluster 0 of the first FAT in order...
entries and per-process filedescriptors. It provides file access, directory operations, security and protection. The virtual file system, an optional layer...
version 2.5.45 of the Linux kernel. Its function is to monitor multiple filedescriptors to see whether I/O is possible on any of them. It is meant to replace...
as file system inodes, so two processes can communicate by opening the same socket. In addition to sending data, processes may send filedescriptors across...
again. The Linux kernel serializes responses for requests to a single filedescriptor, so only one thread or process is woken up. For epoll() in version...