getppid.2freebsd

Langue: en

Version: 266429 (debian - 07/07/09)

Section: 2 (Appels système)


BSD mandoc

NAME

getpid getppid - get parent or calling process identification

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.

SEE ALSO

fork(2), getpgrp(2), kill(2), setpgid(2), setsid(2), exec(3)

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 .