:man| Alphabetical   Categories   About us 
 
FDESCFS (5) | File formats and conventions | Unix Manual Pages | :man

NAME

fdescfs - file-descriptor file system

CONTENTS

Synopsis
Description
Files
See Also
History
Authors

SYNOPSIS


fdescfs /dev/fd fdescfs rw 0 0

DESCRIPTION

The file-descriptor file system, or fdescfs, 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. 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.

FILES

/dev/fd/#

SEE ALSO

mount_devfs(8), mount_fdescfs(8)

HISTORY

AUTHORS

mount_fdescfs(8)

 
Created by Blin Media, 2008-2013