Commit 82088092 authored by Barry Perlman's avatar Barry Perlman Committed by Yoni Fogel

[t:3937] closes #3937 Use perror() to produce errno text in error log on crash.

git-svn-id: file:///svn/toku/tokudb@34492 c7de825b-a66e-492c-adef-691d508d4ae1
parent 877145ba
......@@ -97,7 +97,7 @@ void
toku_do_assert_fail (const char *expr_as_string, const char *function, const char *file, int line, int caller_errno) {
char msg[MSGLEN];
snprintf(msg, MSGLEN, "%s:%d %s: Assertion `%s' failed (errno=%d)\n", file, line, function, expr_as_string, caller_errno);
fprintf(stderr, "%s", msg);
perror(msg);
set_panic_if_not_panicked(caller_errno, msg);
toku_do_backtrace_abort();
}
......@@ -106,7 +106,7 @@ void
toku_do_assert_zero_fail (uintptr_t expr, const char *expr_as_string, const char *function, const char *file, int line, int caller_errno) {
char msg[MSGLEN];
snprintf(msg, MSGLEN, "%s:%d %s: Assertion `%s == 0' failed (errno=%d) (%s=%"PRIuPTR")\n", file, line, function, expr_as_string, caller_errno, expr_as_string, expr);
fprintf(stderr, "%s", msg);
perror(msg);
set_panic_if_not_panicked(caller_errno, msg);
toku_do_backtrace_abort();
}
......
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