Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
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
parenta3491224df3209563b68cc45b9b2d8ab747d208a (diff)
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>
-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);