.\" Copyright (c) 1980, 1991, 1993 .\" The Regents of the University of California. All rights reserved. .\" .\" %sccs.include.redist.man% .\" .\" @(#)getpid.2 8.1 (Berkeley) 06/04/93 .\" .Dd .Dt GETPID 2 .Os BSD 4 .Sh NAME .Nm getpid , .Nm getppid .Nd get parent or calling process identification .Sh SYNOPSIS .Fd #include .Ft pid_t .Fn getpid void .Ft pid_t .Fn getppid void .Sh DESCRIPTION .Fn Getpid returns the process ID of the calling process. The ID is guaranteed to be unique and is useful for constructing temporary file names. .Pp .Fn Getppid returns the process ID of the parent of the calling process. .Sh ERRORS The .Fn getpid and .Fn getppid functions are always successful, and no return value is reserved to indicate an error. .Sh SEE ALSO .Xr gethostid 2 .Sh STANDARDS .Fn Getpid and .Fn getppid conform to IEEE Std 1003.1-1988 .Pq Dq Tn POSIX .