dup2: work around FreeBSD 6.1 bug
authorEric Blake <ebb9@byu.net>
Sat, 10 Oct 2009 03:28:40 +0000 (21:28 -0600)
committerEric Blake <ebb9@byu.net>
Sat, 10 Oct 2009 03:50:04 +0000 (21:50 -0600)
commitb5b8e4ac7a2c0e565507c81f0d4aff3eb46f7084
treececcb5cb81c1ca13896ed1f7a0e39fba821a0f8e
parentf9f3206eb29d0f56a6509c727fe8df2ddb002e71
dup2: work around FreeBSD 6.1 bug

dup2(1,1000000) needs to fail with EBADF (per POSIX), not
EMFILE, based on our usage of it in other modules.

* m4/dup2.m4 (gl_FUNC_DUP2): Detect bug.
* doc/posix-functions/dup2.texi (dup2): Document it.
Reported by Nelson H. F. Beebe and Jim Meyering.

Signed-off-by: Eric Blake <ebb9@byu.net>
ChangeLog
doc/posix-functions/dup2.texi
m4/dup2.m4