Duplicates a file descriptor by replacing another one.
fn dup3(oldfd: i32, newfd: i32, flags: i32) -> i32
| Name | Description |
|---|---|
| oldfd | The file descriptor to duplicate. |
| newfd | The file descriptor to replace. |
| flags | Flags to use when creating the new file descriptor. |
Unless lrs was compiled with the no-auto-cloexec flag, this function automatically adds the O_CLOEXEC flag.