summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger/src/os_common/os_abort.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/third_party/wiredtiger/src/os_common/os_abort.c')
-rw-r--r--src/third_party/wiredtiger/src/os_common/os_abort.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/third_party/wiredtiger/src/os_common/os_abort.c b/src/third_party/wiredtiger/src/os_common/os_abort.c
new file mode 100644
index 00000000000..034eedcfbf8
--- /dev/null
+++ b/src/third_party/wiredtiger/src/os_common/os_abort.c
@@ -0,0 +1,27 @@
+/*-
+ * Copyright (c) 2014-2016 MongoDB, Inc.
+ * Copyright (c) 2008-2014 WiredTiger, Inc.
+ * All rights reserved.
+ *
+ * See the file LICENSE for redistribution information.
+ */
+
+#include "wt_internal.h"
+
+/*
+ * __wt_abort --
+ * Abort the process, dropping core.
+ */
+void
+__wt_abort(WT_SESSION_IMPL *session)
+ WT_GCC_FUNC_ATTRIBUTE((noreturn))
+{
+ __wt_errx(session, "aborting WiredTiger library");
+
+#ifdef HAVE_DIAGNOSTIC
+ __wt_attach(session);
+#endif
+
+ abort();
+ /* NOTREACHED */
+}