Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference

ID 767251
Date 11/07/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

PXFDUP, PXFDUP2

POSIX Subroutine: Duplicates an existing file descriptor.

Module

USE IFPOSIX

CALL PXFDUP (ifildes,ifid,ierror)

CALL PXFDUP2 (ifildes,ifildes2,ierror)

ifildes

(Input) INTEGER(4). The file descriptor to duplicate.

ifid

(Output) INTEGER(4). The returned new duplicated file descriptor.

ifildes2

(Input) INTEGER(4). The number for the new file descriptor.

ierror

(Output) INTEGER(4). The error status.

If successful, ierror is set to zero; otherwise, an error code.

The PXFDUP subroutine creates a second file descriptor for an opened file.

The PXFDUP2 subroutine copies the file descriptor associated with ifildes. Integer number ifildes2 becomes associated with this new file descriptor, but the value of ifildes2 is not changed.