diff options
author | antoine <antoine@FreeBSD.org> | 2008-03-08 22:02:21 +0000 |
---|---|---|
committer | antoine <antoine@FreeBSD.org> | 2008-03-08 22:02:21 +0000 |
commit | 514f31f40ed28fea8fdc190c743417debb0d03b3 (patch) | |
tree | a5c6d546b6b95056f3d9779f9c1afae2cec004f6 /sys/sys/fcntl.h | |
parent | 587a314ce88f943ab58c211714655de88ddbdd25 (diff) | |
download | FreeBSD-src-514f31f40ed28fea8fdc190c743417debb0d03b3.zip FreeBSD-src-514f31f40ed28fea8fdc190c743417debb0d03b3.tar.gz |
Introduce a new F_DUP2FD command to fcntl(2), for compatibility with
Solaris and AIX.
fcntl(fd, F_DUP2FD, arg) and dup2(fd, arg) are functionnaly equivalent.
Document it.
Add some regression tests (identical to the dup2(2) regression tests).
PR: 120233
Submitted by: Jukka Ukkonen
Approved by: rwaston (mentor)
MFC after: 1 month
Diffstat (limited to 'sys/sys/fcntl.h')
-rw-r--r-- | sys/sys/fcntl.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/sys/fcntl.h b/sys/sys/fcntl.h index 8ec5862..ea8531a 100644 --- a/sys/sys/fcntl.h +++ b/sys/sys/fcntl.h @@ -181,6 +181,7 @@ typedef __pid_t pid_t; #define F_GETLK 7 /* get record locking information */ #define F_SETLK 8 /* set record locking information */ #define F_SETLKW 9 /* F_SETLK; wait if blocked */ +#define F_DUP2FD 10 /* duplicate file descriptor to arg */ /* file descriptor flags (F_GETFD, F_SETFD) */ #define FD_CLOEXEC 1 /* close-on-exec flag */ |