Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ exit(2) — Ultrix-11 3.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

lock(2)

plock(2)

semop(2)

signal(2)

wait(2)

exit(2)

NAME

exit − terminate process with status

SYNTAX

void exit(status)
int status;

_exit(status)
int status;

DESCRIPTION

The exit system call is the normal means of terminating a process.  The exit call terminates the calling process with the following consequences:

•The exit call closes all the process’s files and notifies the parent process if it is executing a wait call.  The low-order 8 bits of status are available to the parent process. 

•If the parent process of the calling process is not executing a wait call, the calling process is transformed into a zombie process.  A zombie process only occupies a slot in the system process table.  It has no other space allocated either in user or kernel space.  The process table slot that it occupies is partially overlaid with time accounting information to be used by the times call.  For further information, see <sys/proc.h>. 

•The parent process ID of all of the calling process’s existing child processes  and zombie processes is set to 1.  This means the initialization process (init) inherits each of these processes.  For further information, see intro(2). 

•If the process has a process, text, or data lock, an unlock call is performed.  For further information, see plock(2). 

•An accounting record is written on the accounting file if the system’s accounting routine is enabled.  For further information, see acct(2). 

The exit call can never return. 

The exit call may cause cleanup actions before the final ’sys exit’.  The _exit call circumvents all cleanup. 

ASSEMBLER

(exit = 1.) 
(status in r0)
sys exit

SEE ALSO

lock(2), plock(2), semop(2), signal(2), wait(2)

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