add note about finding the end of memory
[unix-history] / usr / src / lib / libc / sys / getpid.2
CommitLineData
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 10getpid, getppid \- get process identification
97be4b52 11.SH SYNOPSIS
209957d3
KM
12.ft B
13.nf
14pid = getpid()
a84c2e80 15int pid;
209957d3
KM
16.sp
17ppid = getppid()
a84c2e80 18int ppid;
209957d3
KM
19.fi
20.ft R
97be4b52
KM
21.SH DESCRIPTION
22.I Getpid
23returns
24the process ID of
25the current process.
4ee37281 26Most often it is used
209957d3
KM
27to generate uniquely-named temporary files.
28.PP
29.I Getppid
30returns the process ID of the parent
31of the current process.
32.SH "SEE ALSO
33gethostid(2)