dup man page on Plan9

Man page or keyword search:  
man Server   549 pages
apropos Keyword Search (all sections)
Output format
Plan9 logo
[printable version]

DUP(3)									DUP(3)

NAME
       dup - dups of open files

SYNOPSIS
       bind #d /fd

       /fd/0
       /fd/0ctl
       /fd/1
       /fd/1ctl
       ...

DESCRIPTION
       The  dup	 device	 serves	 a  one-level directory containing files whose
       names are decimal numbers.  Each such file also has an associated  con‐
       trol  file.   A file of name n corresponds to open file descriptor n in
       the current process.

       An open(2) of file n results in a file  descriptor  identical  to  what
       would  be returned from a system call dup(n, -1).  Note that the result
       is no longer a file in the dup device.

       The stat operation returns information about the device file,  not  the
       open  file it points to.	 A stat of #d/n will contain n for the name, 0
       for the length, and 0400, 0200, or 0600	for  the  mode,	 depending  on
       whether the dup target is open for reading, writing, or both.

       A file of name nctl may be read to discover the properties of the asso‐
       ciated file descriptor, in format identical to that of the fd  file  in
       proc(3).

SEE ALSO
       dup(2)

SOURCE
       /sys/src/9/port/devdup.c

									DUP(3)
[top]
                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server Plan9

List of man pages available for Plan9

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net