From a8b683d8e29510742f94c7ff558cda19d6644b68 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sat, 28 Apr 2007 03:09:37 -0400 Subject: Add a cb_log call on segfaults This should make it easier to see exactly where a segfault occurs; old method was prone to output flushing issues. Signed-off-by: Dan McGee --- src/pacman/pacman.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c index 62b7cd02..8f640c8e 100644 --- a/src/pacman/pacman.c +++ b/src/pacman/pacman.c @@ -201,6 +201,8 @@ static void cleanup(int signum) { if(signum==SIGSEGV) { + /* write a log message and write to stderr */ + cb_log(PM_LOG_ERROR, "segmentation fault"); fprintf(stderr, "Internal pacman error: Segmentation fault.\n" "Please submit a full bug report with --debug if appropriate.\n"); exit(signum); -- cgit v1.2.3-24-g4f1b