Duplicates the file descriptor, replacing an existing one.
fn duplicate_as(&self, new: i32) -> Result<Self, Errno>
| Name | Description |
|---|---|
| new | The file descriptor to replace. |
The new argument can refer to an open file descriptor but does not have to. In this case, new will be atomically closed and replaced by a duplicate of this file descriptor.