Commit | Line | Data |
---|---|---|
97be4b52 KM |
1 | .\" Copyright (c) 1980 Regents of the University of California. |
2 | .\" All rights reserved. The Berkeley software License Agreement | |
3 | .\" specifies the terms and conditions for redistribution. | |
4 | .\" | |
4ee37281 | 5 | .\" @(#)getpid.2 6.3 (Berkeley) %G% |
97be4b52 | 6 | .\" |
cfb84303 | 7 | .TH GETPID 2 "" |
97be4b52 KM |
8 | .UC 4 |
9 | .SH NAME | |
209957d3 | 10 | getpid, getppid \- get process identification |
97be4b52 | 11 | .SH SYNOPSIS |
209957d3 KM |
12 | .ft B |
13 | .nf | |
14 | pid = getpid() | |
a84c2e80 | 15 | int pid; |
209957d3 KM |
16 | .sp |
17 | ppid = getppid() | |
a84c2e80 | 18 | int ppid; |
209957d3 KM |
19 | .fi |
20 | .ft R | |
97be4b52 KM |
21 | .SH DESCRIPTION |
22 | .I Getpid | |
23 | returns | |
24 | the process ID of | |
25 | the current process. | |
4ee37281 | 26 | Most often it is used |
209957d3 KM |
27 | to generate uniquely-named temporary files. |
28 | .PP | |
29 | .I Getppid | |
30 | returns the process ID of the parent | |
31 | of the current process. | |
32 | .SH "SEE ALSO | |
33 | gethostid(2) |