stderr
¶POSIX specification:
https://pubs.opengroup.org/onlinepubs/9799919799/functions/stderr.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
freopen(NULL, "r+", stderr)
on Cygwin 1.5.21
or newer.
Another is to use the gnulib ftello
module and do
ftello(stderr)
.
stderr
can affect an unrelated file that happened to be assigned to fd 2.
The gnulib xstdopen
or the *-safer modules may be used to
guarantee that fd 2 stays
reserved for stderr
.