GETPID(2,L) AIX Technical Reference GETPID(2,L) ------------------------------------------------------------------------------- getpid, getpgrp, getppid PURPOSE Gets the process, process group, and parent process IDs. SYNTAX pid_t getpid ( ) pid_t getpgrp ( ) pid_t getppid ( ) DESCRIPTION The getpid system call returns the process ID of the calling process. The getpgrp system call returns the process group ID of the calling process. The getppid system call returns the process ID of the calling process's parent process. If a parent process terminates without waiting for all of its child processes to terminate, the remaining child processes become "orphans" and the parent process ID of each remaining child process is set to -1. However, in this case, the getppid system call returns 1 to allow for POSIX conformance. RELATED INFORMATION In this book: "exec: execl, execv, execle, execve, execlp, execvp," "fork, vfork," "setpgid, setpgrp, setsid," and "sigaction, sigvec, signal." Processed November 7, 1990 GETPID(2,L) 1