Main index | Section 3 | Options |
#include <fcntl.h>
#include <unistd.h>
The close-on-exec flag on the new file descriptor is determined by the O_CLOEXEC bit in flags.
If oldd ≠ newd and flags == 0, the behavior is identical to dup2(oldd, newd).
If oldd == newd, then dup3() fails, unlike dup2(2).
[EBADF] | |
The oldd argument is not a valid active descriptor or the newd argument is negative or exceeds the maximum allowable descriptor number | |
[EINVAL] | |
The oldd argument is equal to the newd argument. | |
[EINVAL] | |
The flags argument has bits set other than O_CLOEXEC. | |
DUP3 (3) | August 16, 2013 |
Main index | Section 3 | Options |
Please direct any comments about this manual page service to Ben Bullock. Privacy policy.