Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/a/abort.html on line 1

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/a/abort.html on line 1

Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/a/abort.html on line 8

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/a/abort.html on line 8

abort()

Raise the SIGABRT signal to terminate program execution

Synopsis:

#include <stdlib.h>

void abort( void );

Library:

libc

Use the -l c option to qcc to link against this library. This library is usually included automatically.

Description:

The abort() function causes abnormal process termination to occur by means of the function call raise(SIGABRT), unless the signal SIGABRT is caught and the signal handler doesn't return. If the signal SIGABRT is caught and the signal handler returns, the signal handler is removed and raise(SIGABRT) is called again. Note that prior to calling raise(), abort() ensures that SIGABRT isn't ignored or blocked.

Returns:

The abort() function doesn't return to its caller.

Examples:

#include <stdlib.h>

int main( void )
{
    int major_error = 1;

    if( major_error )
        abort();

    /* You'll never get here. */
    return EXIT_SUCCESS;
}

Classification:

ANSI, POSIX 1003.1

Safety:
Cancellation point No
Interrupt handler No
Signal handler Read the Caveats
Thread Yes

Caveats:

A strictly-conforming POSIX application can't assume that the abort() function is safe to use in a signal handler on other platforms.

See also:

atexit(), close(), execl(), execle(), execlp(), execlpe(), execv(), execve(), execvp(), execvpe(), _exit(), exit(), getenv(), main(), putenv(), sigaction(), signal(), spawn*() functions, system(), wait(), waitpid()


Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/a/abort.html on line 152

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/a/abort.html on line 152