.\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.\" @(#)getpid.2v 1.23 90/02/15 SMI; from UCB 6.3 5/13/86
.TH GETPID 2V "21 January 1990"
.SH NAME
getpid, getppid \- get process identification
.SH SYNOPSIS
.nf
.ft B
int getpid(\|)
.ft
.fi
.LP
.nf
.ft B
int getppid(\|)
.fi
.ft R
.SH SYSTEM V SYNOPSIS
.nf
.ft B
#include <sys/types.h>
.ft
.fi
.LP
.nf
.ft B
pid_t getpid(\|)
.ft
.fi
.LP
.nf
.ft B
pid_t getppid(\|)
.ft R
.fi
.IX  getpid()  ""  \fLgetpid()\fP
.IX  "processes and protection"  getpid()  ""  \fLgetpid()\fP
.IX  getppid()  ""  \fLgetppid()\fP
.IX  "processes and protection"  getppid()  ""  \fLgetppid()\fP
.IX  get "process identification \(em \fLgetpid()\fR"
.IX  get "parent process identification \(em \fLgetppid()\fR"
.IX  process "get identification \(em \fLgetpid()\fR"
.IX  "parent process identification, get \(em \fLgetppid()\fR"
.SH DESCRIPTION
.B getpid(\|)
returns the process
.SM ID
of the current process.  Most often it is used
to generate uniquely-named temporary files.
.LP
.B getppid(\|)
returns the process
.SM ID
of the parent of the current process.
.SH "SEE ALSO
.BR gethostid (2)
