]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/fortran/doc/gfortran/intrinsic-procedures/getpid.rst
sphinx: add missing trailing newline
[thirdparty/gcc.git] / gcc / fortran / doc / gfortran / intrinsic-procedures / getpid.rst
1 ..
2 Copyright 1988-2022 Free Software Foundation, Inc.
3 This is part of the GCC manual.
4 For copying conditions, see the copyright.rst file.
5
6 .. index:: GETPID, system, process ID, process ID
7
8 .. _getpid:
9
10 GETPID --- Process ID function
11 ******************************
12
13 .. function:: GETPID()
14
15 Returns the numerical process identifier of the current process.
16
17 :return:
18 The return value of ``GETPID`` is an ``INTEGER`` of the default
19 kind.
20
21 Standard:
22 GNU extension
23
24 Class:
25 Function
26
27 Syntax:
28 .. code-block:: fortran
29
30 RESULT = GETPID()
31
32 Example:
33 .. code-block:: fortran
34
35 program info
36 print *, "The current process ID is ", getpid()
37 print *, "Your numerical user ID is ", getuid()
38 print *, "Your numerical group ID is ", getgid()
39 end program info
40
41 See also:
42 :ref:`GETGID`,
43 :ref:`GETUID`