From 5bc5d1cb7b31a98c7e206a4d9bf7b3a33ce8df25 Mon Sep 17 00:00:00 2001 From: Barry Perlman Date: Tue, 16 Apr 2013 23:59:49 -0400 Subject: [PATCH] [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 --- windows/toku_assert.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/windows/toku_assert.c b/windows/toku_assert.c index b96206b0b93..c76ab0203cb 100644 --- a/windows/toku_assert.c +++ b/windows/toku_assert.c @@ -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(); }