pxfgetpid

Date:

10-20-2011

NAME

PXFGETPID - Gets the process ID

SYNOPSIS

INTEGER ipid, ierror
CALL PXFGETPID(ipid, ierror)

IMPLEMENTATION

Cray Linux Environment (CLE)

STANDARDS

IEEE Std 1003.9-1992 standard interface for FORTRAN 77

DESCRIPTION

The PXFGETPID subroutine uses the getpid(2) system call to find the current process ID.

All arguments must be of default kind unless documented otherwise. Default kind is KIND=4 for integer, real, complex, and logical arguments.

The following is a list of valid arguments for this routine:

ipid

An output integer variable that contains the process ID of the current process.

ierror

An output integer variable that contains a status of zero if the process ID was successfully acquired.

EXAMPLES

In this example, PXFGETPID returns the current process ID.

program pxftest
integer ipid, ierror

CALL PXFGETPID(ipid, ierror)
if (ierror .eq. 0) then
   print *,'pid = ',ipid
else
   print *,'error = ',ierror
endif
end

SEE ALSO

getpid(2)