Open System Services System Calls Reference Manual (G06.29+, H06.08+, J06.03+)

System Functions (w) wait(2)
Abnormal Termination
Abnormal termination can occur for several reasons, including the following:
The child process calls the Guardian ABEND procedure, or it calls the Guardian
PROCESS_STOP_ procedure with the parameters set for abnormal termination.
The processor in which the process was running fails.
Some critical system resource is exhausted.
One of the functions in the exec, tdm_exec,ortdm_spawn set of functions fails after the
caller of that function has already been overlaid by the child process, and there is no
caller to which it can return the error.
Two traps occur inside an area where a Guardian trap handler is installed by the Guar-
dian SETTRAP procedure.
In all cases of abnormal termination, the SIGABEND signal is delivered. Like the SIGKILL
signal, SIGABEND can neither be caught nor ignored. Its default action is to terminate the pro-
cess.
The WIFSIGNALED macro evaluates to a nonzero value and the SIGABEND signal is indi-
cated by the WTERMSIG macro. Alternatively, the parent process can use the WIFABENDED
macro to determine whether the child process terminated abnormally. The parent process can
use the WCOMPLETION macro to read the completion code.
See the Guardian Procedure Calls Reference Manual for details on the Guardian ABEND,
STOP, and PROCESS_STOP_ procedures and on Guardian completion codes.
Saveabend File Creation
Whenever process termination is caused by signal delivery (that is, when the WIFSIGNALED
macro evaluates to a nonzero value), it is possible that the terminating process creates a
saveabend file.
A saveabend file is created for the process if the saveabend bit is set for the process in the pro-
cess control block (PCB). This bit is set in any of the following ways:
The compiler, linker, or Binder sets the saveabend bit in the code file header.
The tdm_fork( ), tdm_execve(), tdm_execvep(), tdm_spawn( ),ortdm_spawnp()
function sets the pe_debug_options field of the process_extensions_def structure.
The shell command that executes the process sets the saveabend bit.
If a saveabend file is created, the core dump (CD) bit is set in the information returned in the
location pointed to by the status_location parameter. The parent process can use the
WIFSAVEABEND macro to detect the creation of a saveabend file;
WIFSAVEABEND evaluates to a nonzero value when the CD bit is set.
If a processor failure occurs, status about the terminated child processes in the failed processor is
returned to the parent process in the location pointed to by the status_location parameter. In this
case, no saveabend file is possible. WIFSAVEABEND evaluates to zero.
NOTES
If a parent process terminates without waiting for all of its child processes to terminate, the
remaining child processes are assigned a parent process ID of 1.
Suspending a process is not always the same as stopping it. A process is only stopped when a
job-control signal stops it.
527186-023 Hewlett-Packard Company 105