9srv Manual Collection/plan9/dup(3) | 9srv Manual Collection/plan9/dup(3) |
---|
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 associated file descriptor, in format identical to that of the fd file in proc(3).
9srv Manual Collection/plan9/dup(3) | Rev: Sun Dec 02 23:42:21 GMT 2007 |