fcntl: Work around NetBSD bug with F_DUPFD_CLOEXEC.
commita5a7a76caa23695c8b8229e48366cba980291cb4
authorBruno Haible <bruno@clisp.org>
Sun, 29 Nov 2020 20:13:33 +0000 (29 21:13 +0100)
committerBruno Haible <bruno@clisp.org>
Sun, 29 Nov 2020 20:13:33 +0000 (29 21:13 +0100)
tree69f7357249179d2d9d0892e6d0065d8f5306fdb9
parent093ce865871947a28e20fd3802fd828d229d09c0
fcntl: Work around NetBSD bug with F_DUPFD_CLOEXEC.

* m4/fcntl.m4 (gl_FUNC_FCNTL): Test whether F_DUPFD_CLOEXEC actually
works.
* lib/fcntl.c (rpl_fcntl_DUPFD_CLOEXEC): On NetBSD, use the same
fallback implementation as on Haiku.
* tests/test-fcntl.c (main): Add a test whether F_DUPFD_CLOEXEC is
effective.
* doc/posix-functions/fcntl.texi: Mention the NetBSD bug.
ChangeLog
doc/posix-functions/fcntl.texi
lib/fcntl.c
m4/fcntl.m4
tests/test-fcntl.c