Here is a list of things to bear in mind when using the special file names that gawk provides:
PROCINFO
array.
See Built-in Variables.
dup
'ed from file descriptor 4. Most of
the time this does not matter; however, it is important to not
close any of the files related to file descriptors 0, 1, and 2.
Doing so results in unpredictable behavior.
[1] Older versions of gawk would interpret these names internally only if the system did not actually have a /dev/fd directory or any of the other special files listed earlier. Usually this didn't make a difference, but sometimes it did; thus, it was decided to make gawk's behavior consistent on all systems and to have it always interpret the special file names itself.