diff options
Diffstat (limited to 'dbug')
-rw-r--r-- | dbug/dbug.c | 19 | ||||
-rwxr-xr-x | dbug/dbug_add_tags.pl | 1 |
2 files changed, 19 insertions, 1 deletions
diff --git a/dbug/dbug.c b/dbug/dbug.c index 490c91cbf0f..0ea0b0df6ad 100644 --- a/dbug/dbug.c +++ b/dbug/dbug.c @@ -2446,6 +2446,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_() { CODE_STATE *cs; diff --git a/dbug/dbug_add_tags.pl b/dbug/dbug_add_tags.pl index 3e51a54c707..9653124cfd0 100755 --- a/dbug/dbug_add_tags.pl +++ b/dbug/dbug_add_tags.pl @@ -70,4 +70,3 @@ while($src=shift) } warn "All done!\n"; - |