Compaq Fortran for Tru64 UNIX Alpha Systems V5.4

getfd (3f)


Syntax

  integer*4 getfd, fd, lunit
  external getfd
  fd = getfd ( lunit )

Description

  The getfd function returns the file descriptor associated with a Fortran
  logical unit.  This file descriptor can in turn be passed to other routines
  (such as fcntl(2)).  Great care should be used when manipulating the file
  descriptor since it is also heavily used by the Fortran I/O system.  Any
  changes to the file position or file contents through direct manipulation
  of the file descriptor is highly discouraged.

Return Values

  The fd is the return value unless an error occurs; in which case a -1 is
  returned.

Diagnostics

  Examples of conditions that cause an error: if the logical unit number
  passed to getfd is invalid, or if the unit is not open.  You can use errsns
  to get more information on the cause of the error.

See Also

  open(2)