You are viewing the version of this documentation from Perl blead. This is the main development branch of Perl. (git commit e9552b4c627b2c81587da4f3e8c86e95dfe4a69f)
$SYSTEM_FD_MAX
$^F

The maximum system file descriptor, ordinarily 2. System file descriptors are passed to exec()ed processes, while higher file descriptors are not. Also, during an open(), system file descriptors are preserved even if the open() fails (ordinary file descriptors are closed before the open() is attempted). The close-on-exec status of a file descriptor will be decided according to the value of $^F when the corresponding file, pipe, or socket was opened, not the time of the exec().