[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Technical Reference: Base Operating System and Extensions, Volume 1

getpid, getpgrp, or getppid Subroutine

Purpose

Returns the process ID, process group ID, and parent process ID.

Syntax

#include <unistd.h>

pid_t getpid (void)

pid_t getpgrp (void)

pid_t getppid (void)

Description

The getpid subroutine returns the process ID of the calling process.

The getpgrp subroutine returns the process group ID of the calling process.

The getppid subroutine returns the process ID of the calling process' parent process.

Related Information

The exec (exec: execl, execle, execlp, execv, execve, execvp, or exect Subroutine) subroutines, fork (fork, f_fork, or vfork Subroutine) subroutine, setpgid subroutine, setpgrp subroutine, sigaction, sigvec, or signal subroutine.

Subroutines Overview in AIX 5L Version 5.2 General Programming Concepts: Writing and Debugging Programs.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]