Main index | Section 5 | 日本語 | Options |
fdescfs /dev/fd fdescfs rw 0 0
The file system's contents appear as a list of numbered files which correspond to the open files of the process reading the directory. The files /dev/fd/0 through /dev/fd/# refer to file descriptors which can be accessed through the file system. If the file descriptor is open and the mode the file is being opened with is a subset of the mode of the existing descriptor, the call:
fd = open("/dev/fd/0", mode);
and the call:
fd = fcntl(0, F_DUPFD, 0);
are equivalent.
Flags to the open(2) call other than O_RDONLY, O_WRONLY and O_RDWR are ignored.
Note: /dev/fd/0, /dev/fd/1 and /dev/fd/2 files are created by default when devfs alone is mounted. fdescfs creates entries for all file descriptors opened by the process.
For linux(4) ABI compatibility mount fdescfs volume with linrdlnk option.
/dev/fd/# | |
mount -t fdescfs null /dev/fd
For linux(4) ABI compatibility:
mount -t fdescfs -o linrdlnk null /compat/linux/dev/fd
FDESCFS (5) | August 1, 2017 |
Main index | Section 5 | 日本語 | Options |
Please direct any comments about this manual page service to Ben Bullock. Privacy policy.
“ | … one of the main causes of the fall of the Roman Empire was that, lacking zero, they had no way to indicate successful termination of their C programs. | ” |
— Robert Firth |