z/OS UNIX System Services Planning
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


File descriptor files

z/OS UNIX System Services Planning
GA32-0884-00

A file descriptor file, /dev/fdn or /def/fd/n (major 5, minor n) is used to refer to the same file as a previously opened file, as indicated by file descriptor n. If file n is a regular file or a character special file, the open for /dev/fdn or dev/fd/n will be done as a real open of the file with file descriptor n. Otherwise, the dup protocol will be used for that open.

When naming file descriptor file, the n in /dev/fdn or /dev/fd/n is the same as the minor number. The minor number determines which file descriptor number to duplicate. For example, opening /dev/fd1 creates a file descriptor that is a duplicate of file descriptor 1. This might be useful for a program that expects a file name for output, but you might want it to write its output to stdout instead.

/dev/fdn files are used by c89 to avoid the name-length limitations imposed by the DD statement PATH parameter.

Use of c89 assumes that you follow the naming conventions for file descriptor files.

File descriptor files are created dynamically as needed by the system when they are first referenced.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014