mirror of
https://github.com/MariaDB/server.git
synced 2025-01-22 06:44:16 +01:00
[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
This commit is contained in:
parent
0881909006
commit
5bc5d1cb7b
1 changed files with 2 additions and 2 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue