Commit bfff36ae authored by Tor Didriksen's avatar Tor Didriksen

Automerge 5.1-bugteam => 5.5-bugteam

parents c97e73f7 27c7f7a2
...@@ -2377,6 +2377,25 @@ void _db_flush_() ...@@ -2377,6 +2377,25 @@ void _db_flush_()
} }
#ifndef __WIN__
void _db_suicide_()
{
int retval;
sigset_t new_mask;
sigfillset(&new_mask);
fprintf(stderr, "SIGKILL myself\n");
fflush(stderr);
retval= kill(getpid(), SIGKILL);
assert(retval == 0);
retval= sigsuspend(&new_mask);
fprintf(stderr, "sigsuspend returned %d errno %d \n", retval, errno);
assert(FALSE); /* With full signal mask, we should never return here. */
}
#endif /* ! __WIN__ */
void _db_lock_file_() void _db_lock_file_()
{ {
CODE_STATE *cs; CODE_STATE *cs;
......
...@@ -132,7 +132,8 @@ extern const char* _db_get_func_(void); ...@@ -132,7 +132,8 @@ extern const char* _db_get_func_(void);
#ifdef __WIN__ #ifdef __WIN__
#define DBUG_SUICIDE() DBUG_ABORT() #define DBUG_SUICIDE() DBUG_ABORT()
#else #else
#define DBUG_SUICIDE() (_db_flush_(), kill(getpid(), SIGKILL), pause()) extern void _db_suicide_();
#define DBUG_SUICIDE() (_db_flush_(), _db_suicide_())
#endif #endif
#else /* No debugger */ #else /* No debugger */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment