GETPID(2) — Silicon Graphics
NAME
getpid, getpgrp, getppid − get process, process group, and parent process IDs
SYNOPSIS
int getpid ()
int getpgrp ()
int getppid ()
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.
These system calls are useful for generating uniquely-named temporary files.
SEE ALSO
exec(2), fork(2), intro(2), setpgrp(2), signal(2).
ASSEMBLER
moveq#20,D0| getpid
trap#0
Process ID is returned in D0.
moveq#39,D0| getpgrp
movl#0,A0
trap#0
Process ID is returned in D0.
moveq#20,D0| getppid
trap#0
Parent process ID is returned in D1.
Version 2.1 — January 02, 1985