ReactOS  0.4.14-dev-323-g6fe6a88
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 
14 static 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 
23 void
24 __cdecl
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 
52  raise(SIGABRT);
53  _exit(3);
54 }
55 
#define SIGABRT
Definition: signal.h:28
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:49
#define __cdecl
Definition: accygwin.h:79
int msvcrt_error_mode
Definition: errno.c:115
#define _OUT_TO_DEFAULT
Definition: stdlib.h:122
unsigned int __abort_behavior
Definition: abort.c:12
#define _WRITE_ABORT_MSG
Definition: stdlib.h:127
#define _CALL_REPORTFAULT
Definition: stdlib.h:128
_Check_return_opt_ _CRTIMP int __cdecl fprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format,...)
void _exit(int exitcode)
Definition: _exit.c:25
#define _OUT_TO_MSGBOX
Definition: stdlib.h:124
void __cdecl abort(void)
Aborts the program.
Definition: abort.c:25
int __app_type
Definition: environ.c:30
#define MB_ICONERROR
Definition: winuser.h:781
int __cdecl __crt_MessageBoxA(_In_opt_ const char *pszText, _In_ unsigned int uType)
#define MB_OK
Definition: winuser.h:784
FILE * stderr
#define _GUI_APP
Definition: internal.h:165
static const char abort_msg[]
Definition: abort.c:14