summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2007-04-28 03:09:37 -0400
committerDan McGee <dan@archlinux.org>2007-04-28 03:09:37 -0400
commita8b683d8e29510742f94c7ff558cda19d6644b68 (patch)
tree1aa64df1dff5afa00033176a398474555936b0d4 /src
parenta3491224df3209563b68cc45b9b2d8ab747d208a (diff)
downloadpacman-a8b683d8e29510742f94c7ff558cda19d6644b68.tar.xz
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 <dan@archlinux.org>
Diffstat (limited to 'src')
-rw-r--r--src/pacman/pacman.c2
1 files changed, 2 insertions, 0 deletions
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);