c8b60c2d9ec5ce1575849fe461bb70b491cebf96
[gnulib.git] / doc / posix-functions / freopen.texi
1 @node freopen
2 @section @code{freopen}
3 @findex freopen
4
5 POSIX specification: @url{http://www.opengroup.org/onlinepubs/9699919799/functions/freopen.html}
6
7 Gnulib module: freopen
8
9 Portability problems fixed by Gnulib:
10 @itemize
11 @item
12 On Windows platforms (excluding Cygwin), this function does usually not
13 recognize the @file{/dev/null} filename.
14 @end itemize
15
16 Portability problems not fixed by Gnulib:
17 @itemize
18 @item
19 On Windows platforms (excluding Cygwin), this function does not set @code{errno}
20 upon failure.
21 @item
22 This function does not fail when the file name argument ends in a slash
23 and (without the slash) names a nonexistent file or a file that is not a
24 directory, on some platforms:
25 HP-UX 11.00, Solaris 9, Irix 5.3.
26 @item
27 Applications should not assume that @code{fileno(f)} will be the same
28 before and after a call to @code{freopen(name,mode,f)}.  However, the
29 module freopen-safer can at least protect @code{stdin}, @code{stdout},
30 and @code{stderr}.
31 @end itemize