dgabort(3C)
_________________________________________________________________
dgabort function
Abort the user program immediately.
_________________________________________________________________
Calling Sequence
void dgabort();
Description
Use the dg_abort function to raise the SIGIOT signal. If this
signal is not caught by the signal function, it will immediately
terminate the program with a stack traceback and a memory dump.
In comparison, the function abort does not generate a traceback.
Returns
If the SIGIOT signal is caught and the signal handler returns,
the abort function will return; otherwise, it will not.
Related Functions
See also the abort and exit functions, described in this chapter,
and the signal function, described in Chapter 2 of Using
Specialized C Functions.
Example
/* Program test for the dg_abort() function */
#include <stdio.h>
main(argc, argv)
int argc;
char *argv[];
{
if (argc > 1) {
printf("Number of arguments to program is %d.\n",
argc - 1);
printf("Preparing for normal exit...\n");
}
else {
printf("Preparing to abort...\n");
dg_abort();
}
DG/UX 4.00 Page 1
Licensed material--property of copyright holder(s)
dgabort(3C)
}
If you call the program test with three arguments A, B, and C,
the output is
Number of arguments to program is 3.
Preparing for normal exit...
and if you call it with no arguments, you receive the message
Preparing to abort...
ERROR 74438.
from $traceback in task 1 (unique task id is 1).
Call Traceback:
from fp=16000012306, pc=.sig.core+15
from fp=16000012270, pc=$interrupt+15
from fp=16000012252, pc=abort+11
from fp=16000012234, pc=main+45
from fp=16000012160, pc=.MAIN.+52, C initializer
from fp= 0, pc=I.INIT+33
Signal SIGIOT (abort routine) aborted program with memory dump.
DG/UX 4.00 Page 2
Licensed material--property of copyright holder(s)