Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ getpid(2) — HP-UX 6.20

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

exec(2)

fork(2)

setpgrp(2)

signal(2)

GETPID(2)  —  HP-UX

NAME

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

SYNOPSIS

int getpid ()
int getpgrp ()
int getppid ()
int getpgrp2 (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 real or effective user ID of the current process must match the real or saved user ID of the referenced process, the effective user ID of the current process must be super-user, or the referenced process must be a descendant of the current process. 

ERRORS

Getpgrp2 will fail if any of the following are true:

[EPERM] The effective user ID of the current process is not super-user, the real or effective user ID of the current process does not match the real or saved user ID of the specified process, and the specified process is not a descendant of the current process. 

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

DEPENDENCIES

Series 300
Getpgrp2 is not supported. 

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), signal(2). 

Hewlett-Packard Company  —  May 11, 2021

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