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>
This commit is contained in:
Dan McGee 2007-04-28 03:09:37 -04:00
parent a3491224df
commit a8b683d8e2
1 changed files with 2 additions and 0 deletions

View File

@ -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);