system_getpid(3f) - [M_system:QUERY] get PID (process ID) of current process from Fortran by calling getpid(3c) (LICENSE:PD)
Synopsis
Description
Return Value
Examples
integer function system_getpid()
The system_getpid() function returns the process ID of the calling process.
The value returned is the integer process ID. The system_getpid() function shall always be successful and no return value is reserved to indicate an error.
Get process PID from Fortran
program demo_system_getpid use M_system, only : system_getpid implicit none write(*,*)PID=,system_getpid() end program demo_system_getpidResults:
> PID= 484721
Nemo Release 3.1 | system_getpid (3m_system) | March 07, 2025 |