ReactOS 0.4.16-dev-237-gd6eebaa
abort.c
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS C runtime library
3 * LICENSE: BSD - See COPYING.ARM in the top level directory
4 * FILE: lib/sdk/crt/stdlib/abort.c
5 * PURPOSE: abort implementation
6 * PROGRAMMER: Timo Kreuzer (timo.kreuzer@reactos.org)
7 */
8
9#include "precomp.h"
10#include <signal.h>
11
13
14static const char abort_msg[] =
15 "This application has requested the Runtime to terminate in an unusual way.\n"
16 "Please contact the application's support team for more information.\0";
17
23void
26 void)
27{
28 /* Check if a message should be output */
30 {
31 /* Check if we should display a message box */
34 {
35 /* Output a message box */
37 }
38 else
39 {
40 /* Print message to stderr */
41 fprintf(stderr, "%s\n", abort_msg);
42 }
43 }
44
45 /* Check if faultrep handler should be called */
47 {
49 (void)0;
50 }
51
53 _exit(3);
54}
55
void _exit(int exitcode)
Definition: _exit.c:25
unsigned int __abort_behavior
Definition: abort.c:12
void __cdecl abort(void)
Aborts the program.
Definition: abort.c:25
static const char abort_msg[]
Definition: abort.c:14
#define __cdecl
Definition: accygwin.h:79
int __cdecl raise(int _SigNum)
Definition: signal.c:71
#define SIGABRT
Definition: signal.h:28
#define stderr
Definition: stdio.h:100
_Check_return_opt_ _CRTIMP int __cdecl fprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format,...)
#define _CALL_REPORTFAULT
Definition: stdlib.h:116
#define _OUT_TO_MSGBOX
Definition: stdlib.h:112
#define _OUT_TO_DEFAULT
Definition: stdlib.h:110
#define _WRITE_ABORT_MSG
Definition: stdlib.h:115
#define _GUI_APP
Definition: internal.h:146
int __cdecl __crt_MessageBoxA(_In_opt_ const char *pszText, _In_ unsigned int uType)
int msvcrt_error_mode
Definition: errno.c:113
int __app_type
Definition: environ.c:30
#define MB_ICONERROR
Definition: winuser.h:790
#define MB_OK
Definition: winuser.h:793