Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ getpgrp(2) — HP-UX 9.10

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 <unistd.h>

pid_t getpid(void);

pid_t getpgrp(void);

pid_t getppid(void);

pid_t getpgrp2(pid_t pid);

DESCRIPTION

The following functions return the information indicated:

getpid() Process ID of the calling process. 

getpgrp() Process group ID of the calling process. 

getppid() Parent process ID of the calling process. 

getpgrp2() 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 fails if any of the following conditions are encountered:

[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(): AES, SVID2, XPG2, XPG3, XPG4, FIPS 151-2, POSIX.1

getpgrp(): AES, SVID2, XPG2, XPG3, XPG4, FIPS 151-2, POSIX.1

getppid(): AES, SVID2, XPG2, XPG3, XPG4, FIPS 151-2, POSIX.1

Hewlett-Packard Company  —  HP-UX Release 9.10: April 1995

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