summaryrefslogtreecommitdiff
path: root/dbug
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2011-03-09 15:47:59 +0200
committerMichael Widenius <monty@askmonty.org>2011-03-09 15:47:59 +0200
commit139a2b64bf8ec2e248656835e23a5c98ffc667a8 (patch)
tree7d77d6f1073f8090f275b30cb3f10254497da243 /dbug
parentb3f7eac5301529c2d069ebe4d0558980412af3a2 (diff)
parentce675406ca8dbc1532a908803a1371de8432d466 (diff)
downloadmariadb-git-139a2b64bf8ec2e248656835e23a5c98ffc667a8.tar.gz
Merge with 5.2
Diffstat (limited to 'dbug')
-rw-r--r--dbug/dbug.c19
-rwxr-xr-xdbug/dbug_add_tags.pl1
2 files changed, 19 insertions, 1 deletions
diff --git a/dbug/dbug.c b/dbug/dbug.c
index afed84a1c01..29657c9dd03 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";
-