dup2: work around cygwin bug
authorEric Blake <eblake@redhat.com>
Mon, 31 Dec 2012 18:15:53 +0000 (11:15 -0700)
committerEric Blake <eblake@redhat.com>
Mon, 31 Dec 2012 18:51:32 +0000 (11:51 -0700)
commitcb83c6cb603abfa9cd8945013226e17c894309f2
tree4996d34a82ed3f0798f243cfc801ef92c0060439
parent14ec011a3937faee6f4af6ea1655fffdf5691576
dup2: work around cygwin bug

Detected by './gnulib-tool --test dup2 cloexec'.
Reported upstream: http://cygwin.com/ml/cygwin/2012-12/msg00377.html
and fixed already: http://cygwin.com/ml/cygwin-cvs/2012-q4/msg00202.html
but as we want to work with older cygwin, we'll have to carry this
in gnulib for a while.

* m4/dup2.m4 (gl_FUNC_DUP2): Flush out cygwin core dump.
* lib/dup2.c (rpl_dup2): Work around it.
* doc/posix-functions/dup2.texi (dup2): Document it.

Signed-off-by: Eric Blake <eblake@redhat.com>
ChangeLog
doc/posix-functions/dup2.texi
lib/dup2.c
m4/dup2.m4