1
0
mirror of https://git.savannah.gnu.org/git/gnulib.git synced 2025-08-18 23:42:00 +03:00
Files
gnulib/doc/posix-functions/dup2.texi
Bruno Haible 4a2a66e445 dup2: Remove check for dup2, unless supporting old obsolete platforms.
* modules/dup2-obsolete: New file.
* m4/dup2-obsolete.m4: New file.
* m4/dup2.m4 (gl_FUNC_DUP2): Don't check whether dup2 exists if
gl_FUNC_DUP2_OBSOLETE is not also defined.
* modules/dup2 (Depends-on): Add dup2-obsolete.
* doc/posix-functions/dup2.texi: Mention module dup2-obsolete.
2011-04-25 19:45:09 +02:00

48 lines
1.2 KiB
Plaintext

@node dup2
@section @code{dup2}
@findex dup2
POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/dup2.html}
Gnulib module: dup2 or dup2-obsolete
Portability problems fixed by either Gnulib module @code{dup2} or @code{dup2-obsolete}:
@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 resets the @code{FD_CLOEXEC} flag when duplicating an fd
to itself on some platforms:
Haiku.
@item
This function returns 0 for @code{dup2 (1, 1)} on some platforms:
Cygwin 1.5.x.
@item
This function may return @code{-EBADF} instead of @code{-1} on some platforms:
Linux releases between July 2008 and May 2009 (versions 2.6.27 to 2.6.29).
@item
This function returns @code{EMFILE} instead of @code{EBADF} for
extremely large targets, which interferes with using
@code{dup2(fd,fd)==fd)} as the minimal @code{EBADF} filter:
FreeBSD 6.1, Cygwin 1.5.
@end itemize
Portability problems fixed by Gnulib module @code{dup2-obsolete}:
@itemize
@item
This function is missing on some older platforms.
@end itemize
Portability problems not fixed by Gnulib:
@itemize
@end itemize