|
NAMEfdescfs —
file-descriptor file system
SYNOPSISfdescfs /dev/fd fdescfs rw 0 0 DESCRIPTIONThe file-descriptor file system, orfdescfs , provides
access to the per-process file descriptor namespace in the global file system
namespace. The conventional mount point is /dev/fd.
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. The following mount options can be used when mounting
For 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 For fd = open("/dev/fd/0", mode); reopens the referenced vnode with the specified
mode. In other words, the
fd = openat(0, "", O_EMPTY_PATH, mode); In particular, if the file descriptor was opened with the
Note: /dev/fd/0,
/dev/fd/1 and /dev/fd/2
files are created by default when devfs alone is mounted.
FILES
EXAMPLESTo mount afdescfs volume located on
/dev/fd:
mount -t fdescfs none
/dev/fd For linux(4) ABI compatibility: mount -t fdescfs -o linrdlnk none
/compat/linux/dev/fd For substitute of mount -t fdescfs -o nodup none
/dev/fdpath SEE ALSOdevfs(5), mount(8)HISTORYThefdescfs file system first appeared in
4.4BSD. The fdescfs manual
page first appeared in FreeBSD 2.2.
AUTHORSThefdescfs manual page was written by
Mike Pritchard
<mpp@FreeBSD.org>, and
was based on the manual page written by Jan-Simon
Pendry.
Visit the GSP FreeBSD Man Page Interface. |