[PATCH 3/3] [Msvcrt]: use raise(SIGABRT) for abort() and assert()

Eric Pouech eric.pouech at wanadoo.fr
Thu Feb 8 14:33:45 CST 2007




A+
---

 dlls/msvcrt/exit.c   |    4 ++++
 dlls/msvcrt/msvcrt.h |    1 +
 2 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/dlls/msvcrt/exit.c b/dlls/msvcrt/exit.c
index a5d5283..9badd72 100644
--- a/dlls/msvcrt/exit.c
+++ b/dlls/msvcrt/exit.c
@@ -155,6 +155,8 @@ void CDECL MSVCRT_abort(void)
   }
   else
     _cputs("\nabnormal program termination\n");
+  MSVCRT_raise(MSVCRT_SIGABRT);
+  /* in case raise() returns */
   MSVCRT__exit(3);
 }
 
@@ -172,6 +174,8 @@ void CDECL MSVCRT__assert(const char* st
   }
   else
     _cprintf("Assertion failed: %s, file %s, line %d\n\n",str, file, line);
+  MSVCRT_raise(MSVCRT_SIGABRT);
+  /* in case raise() returns */
   MSVCRT__exit(3);
 }
 
diff --git a/dlls/msvcrt/msvcrt.h b/dlls/msvcrt/msvcrt.h
index e7b037f..83a27fd 100644
--- a/dlls/msvcrt/msvcrt.h
+++ b/dlls/msvcrt/msvcrt.h
@@ -611,6 +611,7 @@ MSVCRT_FILE*   MSVCRT__fdopen(int, const
 int            MSVCRT_vsnprintf(char *str, unsigned int len, const char *format, va_list valist);
 int            MSVCRT_vsnwprintf(MSVCRT_wchar_t *str, unsigned int len,
                                  const MSVCRT_wchar_t *format, va_list valist );
+int            MSVCRT_raise(int sig);
 
 #ifndef __WINE_MSVCRT_TEST
 int            _write(int,const void*,unsigned int);




More information about the wine-patches mailing list