From 82ba818ff456bcd6d56a06226e3f27e98fbb55c3 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Thu, 14 Aug 2025 22:58:58 -0500 Subject: removing all downloaded devdocs files --- devdocs/c/program%2Fabort.html | 45 ------------------------------------------ 1 file changed, 45 deletions(-) delete mode 100644 devdocs/c/program%2Fabort.html (limited to 'devdocs/c/program%2Fabort.html') diff --git a/devdocs/c/program%2Fabort.html b/devdocs/c/program%2Fabort.html deleted file mode 100644 index 8755f11c..00000000 --- a/devdocs/c/program%2Fabort.html +++ /dev/null @@ -1,45 +0,0 @@ -

abort

Defined in header <stdlib.h>
void abort(void);
(until C11)
_Noreturn void abort(void);
-
(since C11)
(until C23)
[[noreturn]] void abort(void);
-
(since C23)

Causes abnormal program termination unless SIGABRT is being caught by a signal handler passed to signal and the handler does not return.

-

Functions passed to atexit() are not called. Whether open resources such as files are closed is implementation defined. An implementation defined status is returned to the host environment that indicates unsuccessful execution.

-

Parameters

(none)

-

Return value

(none)

-

Notes

POSIX specifies that the abort() function overrides blocking or ignoring the SIGABRT signal.

-

Some compiler intrinsics, e.g. __builtin_trap (gcc, clang, and icc) or __fastfail/__debugbreak (msvc), can be used to terminate the program as fast as possible.

-

Example

#include <stdio.h>
-#include <stdlib.h>
- 
-int main(void)
-{
-    FILE *fp = fopen("data.txt","r");
-    if (fp == NULL)
-    {
-        fprintf(stderr, "error opening file data.txt in function main()\n");
-        abort();
-    }
- 
-    /* Normal processing continues here. */
-    fclose(fp);
-    printf("Normal Return\n");
-    return 0;
-}

Output:

-
error opening file data.txt in function main()

References

See also

- - - -
causes normal program termination with cleaning up
(function)
registers a function to be called on exit() invocation
(function)
-
(C11)
causes normal program termination without completely cleaning up
(function)
C++ documentation for abort
-

- © cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
- https://en.cppreference.com/w/c/program/abort -

-
-- cgit v1.2.3