getppid(2) get parent or calling process identification

Other Alias

getpid

LIBRARY

Lb libc

SYNOPSIS

In sys/types.h In unistd.h Ft pid_t Fn getpid void Ft pid_t Fn getppid void

DESCRIPTION

The Fn getpid system call returns the process ID of the calling process. Though the ID is guaranteed to be unique, it should NOT be used for constructing temporary file names, for security reasons; see mkstemp(3) instead.

The Fn getppid system call returns the process ID of the parent of the calling process.

ERRORS

The Fn getpid and Fn getppid system calls are always successful, and no return value is reserved to indicate an error.

STANDARDS

The Fn getpid and Fn getppid system calls are expected to conform to St -p1003.1-90 .

HISTORY

The Fn getpid function appeared in AT&T System v7 .