BSD 4_2 development
[unix-history] / usr / man / man2 / getpid.2
CommitLineData
c1c3457c
C
1.TH GETPID 2 "12 February 1983"
2.UC 4
3.SH NAME
4getpid, getppid \- get process identification
5.SH SYNOPSIS
6.ft B
7.nf
8pid = getpid()
9long pid;
10.sp
11ppid = getppid()
12long ppid;
13.fi
14.ft R
15.SH DESCRIPTION
16.I Getpid
17returns
18the process ID of
19the current process.
20Most often it is used with the host identifier
21.IR gethostid (2)
22to generate uniquely-named temporary files.
23.PP
24.I Getppid
25returns the process ID of the parent
26of the current process.
27.SH "SEE ALSO
28gethostid(2)