Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ getpgrp(2) — HP-UX 7.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

exec(2)

fork(2)

setpgrp(2)

setpgid(2)

signal(5)

GETPID(2)

NAME

getpid, getpgrp, getppid, getpgrp2 − get process, process group, and parent process ID

SYNOPSIS

#include <sys/types.h>
pid_t getpid ()
pid_t getpgrp ()
pid_t getppid ()
pid_t getpgrp2 (pid)
pid_t pid;

DESCRIPTION

Getpid returns the process ID of the calling process. 

Getpgrp returns the process group ID of the calling process. 

Getppid returns the parent process ID of the calling process. 

Getpgrp2 returns the process group ID of the specified process.  If pid is zero, the call applies to the current process.  For this to be allowed, the current process and the referenced process must be in the same session. 

ERRORS

Getpgrp2 will fail if any of the following are true:

[EPERM] The current process and the specified process are not in the same session. 

[ESRCH] No process can be found corresponding to that specified by pid.

AUTHOR

Getpid, getppid, getpgrp, and getpgrp2 were developed by HP, AT&T, and the University of California, Berkeley. 

SEE ALSO

exec(2), fork(2), setpgrp(2), setpgid(2), signal(5). 

STANDARDS CONFORMANCE

getpid: SVID2, XPG2, XPG3, POSIX.1, FIPS 151-1

getpgrp: SVID2, XPG2, XPG3, POSIX.1, FIPS 151-1

getppid: SVID2, XPG2, XPG3, POSIX.1, FIPS 151-1

Hewlett-Packard Company  —  HP-UX Release 7.0: Sept 1989

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026