getfd(lunit)

Purpose

Given a Fortran logical unit, the getfd function returns the underlying file descriptor for that unit, or -1 if the unit is not connected.

Note:
Because XL Fortran does its own I/O buffering, using this function may require special care, as described in Mixed-language input and output.

Class

Function

Argument type and attributes

lunit
INTEGER(4), INTENT(IN)

Result type and attributes

INTEGER(4)

Result value

This function returns the underlying file descriptor of the given logical unit, or -1 if the unit is not connected.