Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ abort(3C) — DG/UX 4.00

Media Vault

Software Library

Restoration Projects

Artifacts Sought



                                                                abort(3C)



        _________________________________________________________________
        abort                                                    function
        Abort the user program immediately.
        _________________________________________________________________


        Calling Sequence

        void abort();


        Description

        Use the 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 memory dump; no traceback occurs.
        If you want a stack traceback, use the dg_abort function.


        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 dg_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 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");
                abort();
            }



        DG/UX 4.00                                                 Page 1
               Licensed material--property of copyright holder(s)





                                                                abort(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, the program aborts
        immediately.












































        DG/UX 4.00                                                 Page 2
               Licensed material--property of copyright holder(s)



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