.TH getpid() "" "" "System Call (libc)"
.PC "Get process identifier"
.B "#include <unistd.h>"
.B "getpid(\|)"
.PP
.II "process^id"
Every process has a unique number, called its
.IR "process id" .
.B fork()
returns the process id of a created child process to the parent process.
.PP
.B getpid()
returns the process id of the requesting process.
Typically a process uses
.B getpid()
to pass its process id to another
process which wants to send it a signal,
or to generate a unique temporary file name.
.SH Example
For an example of using this system call in a C program, see
.BR signal() .
.SH "See Also"
.Xr "fork()," fork
.Xr "getppid()," getppid
.Xr "kill," kill
.Xr "libc," libc
.Xr "mktemp," mktemp
.Xr "unistd.h" unistd.h
.br
\*(PX Standard, \(sc4.1.1
