pxffcntl(3F)
PXFFCNTL - Provides a subset of fcntl(2) functionality, except the third argument is always an integer
As shipped in IRIX 6.5. First release of IRIX 6.5.
NAME PXFFCNTL - Provides a subset of fcntl(2) functionality, except the third argument is always an integer SYNOPSIS INTEGER ifildes, icmd, iargin, iargout, ierror CALL PXFFCNTL (ifildes, icmd, iargin, iargout, ierror) IMPLEMENTATION UNICOS, UNICOS/mk, and IRIX systems DESCRIPTION On IRIX systems, this routine is in libfortran.so which is linked by default when compiling programs with the MIPSpro 7 Fortran 90 compiler or when compiling programs with the -craylibs option to the MIPSpro 7.2 F77 compiler. The PXFFNCTL() subroutine provides a subset of the functionality of fcntl(2), except that the third argument is always an integer. When using the CF90 compiler or MIPSpro 7 Fortran 90 compiler on UNICOS, UNICOS/mk, or IRIX systems, all arguments must be of default kind unless documented otherwise. On UNICOS and UNICOS/mk, default kind is KIND=8 for integer, real, complex, and logical arguments; on IRIX, the default kind is KIND=4. The arguments for PXFFNCTL() are: ifildes An open file descriptor. ifildes is an input integer variable. icmd An input integer variable. Specifies the action for fcntl to perform, as described on the fcntl(2) man page. The constant values for use in specifying icmd are available through calls to PXFCONST(3F). The following values are currently supported for icmd: F_CLRALF* F_DUPFD F_GETFD F_GETFL F_GETLK F_SETALF* F_SETFD F_SETFL F_SETSB* F_SETLK F_SETLKW * = UNICOS and UNICOS/mk systems only iargin An input integer variable. As described below, iargin may also be an output variable. iargin can be a handle for an instance of the flock structure or an integer, depending on the argument icmd under the conditions defined in POSIX.1. If icmd is F_GETLK, F_SETLK, or F_SETLKW, then iargin is a handle for an instance of the flock structure. This handle should be created by a call to the PXFSTRUCTCREATE() subroutine, with the string flock given as the STRUCTNAME argument. The components are then accessed with the subroutines PXFINTSET() and PXFINTGET(), as shown following: Components for flock structure: ---------------------------------------------------- Posix.1 Structure procedures used component COMPNAM to access ---------------------------------------------------- l_type l_type PXFINTGET, PXFINTSET l_whence l_whence PXFINTGET, PXFINTSET l_start l_start PXFINTGET, PXFINTSET l_len l_len PXFINTGET, PXFINTSET l_pid l_pid PXFINTGET, PXFINTSET ---------------------------------------------------- If icmd is F_GETLK, the retrieved information overwrites the information described in the handle used as the iargin argument. iargout An output integer variable. The value returned in iargout depends on the icmd argument. See fcntl() for more information. ierror An output integer variable. It contains the exit status. EXIT STATUS Upon successful completion of PXFFCNTL(), the argument ierror is set to 0. If any of the following conditions occur, ierror is set to the corresponding value: EINVAL icmd is not valid. EINVAL icmd is F_GETLK, F_SETLK, or F_SETLKW and iargin is not a valid handle. errno The fcntl(2) system call failed. EBADHANDLE iargin, when icmd is F_GETLK, F_SETLK, or F_SETLKW, is an invalid handle or has an incorrect handle type for this routine. SEE ALSO PXFCONST(3F), PXFSTRUCTCREATE(3F), PXFINTGET(3F), PXFINTSET(3F) Application Programmer's Library Reference Manual, publication SR- 2165, for the printed version of this man page.