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:
parent
a3491224df
commit
a8b683d8e2
1 changed files with 2 additions and 0 deletions
|
@ -201,6 +201,8 @@ static void cleanup(int signum)
|
||||||
{
|
{
|
||||||
if(signum==SIGSEGV)
|
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"
|
fprintf(stderr, "Internal pacman error: Segmentation fault.\n"
|
||||||
"Please submit a full bug report with --debug if appropriate.\n");
|
"Please submit a full bug report with --debug if appropriate.\n");
|
||||||
exit(signum);
|
exit(signum);
|
||||||
|
|
Loading…
Add table
Reference in a new issue