◄ Wiki / OS
file descriptor
A file descriptor is a small integer the operating system hands you to refer to an open file, socket, or other I/O channel.
Instead of passing around a whole object, Unix-style systems give each open resource a plain number, and you use that number to read, write, or close it. The elegance is uniformity: files, network sockets, pipes, and devices all become 'just a file descriptor,' so the same read/write calls work on all of them. Exposing sockets as ordinary file descriptors lets network code reuse the same plumbing as file code.
See also
Referenced by
fork · fork / clone · GPT · ICMP