Hash :
80cb44fa
Author :
Date :
2009-07-21T09:00:57
dup2: fix more mingw problems * lib/dup2.c (rpl_dup2) [_WIN32]: Avoid hanging when duplicating fd to itself. * doc/posix-functions/dup2.texi (dup2): Document the bug. * lib/unistd.in.h (dup2) [REPLACE_FCHDIR]: Avoid name collision. * lib/fchdir.c (dup2): Manage preprocessor macros correctly. (rpl_dup2_fchdir): Rename from rpl_dup2, and let dup2 module take care of mingw bugs. Signed-off-by: Eric Blake <ebb9@byu.net>
@node dup2
@section @code{dup2}
@findex dup2
POSIX specification: @url{http://www.opengroup.org/onlinepubs/9699919799/functions/dup2.html}
Gnulib module: dup2
Portability problems fixed by Gnulib:
@itemize
@item
This function always returns 0 for success on some platforms:
mingw.
@item
This function can hang when duplicating an fd to itself on some platforms:
mingw.
@item
This function returns 0 for dup2 (1, 1) on some platforms:
Cygwin 1.5.x.
@item
This function is missing on some older platforms.
@end itemize
Portability problems not fixed by Gnulib:
@itemize
@end itemize