gnc_log_init: Be more robust in log file open failure case

Derek Atkins warlord at MIT.EDU
Thu Dec 2 10:20:30 EST 2004


Applied to HEAD.  It'll get into g2 at the next merge.

-derek

Stephen Evanchik <evanchsa at clarkson.edu> writes:

> This should patch against HEAD and gnucash-gnome2-dev. 
>
> Bug:
>
> If /tmp/gnucash.trace is not accessible by the user then gnucash will
> segfault because the fopen in gnc_log_init returned a NULL FILE stream.
>
>
> Summary of changes:
>
> gnc_log_init will now attempt to open trace files in this order:
>
> /tmp/gnucash.trace
>
> if that fails,
>
> /tmp/gnucash.trace.<PID of gnucash>
>
> and if that fails debug output will go to STDERR. 
>
>
> Files affected:
>
> src/engine/gnc-trace.c
>
>
>
> Stephen Evanchik
>
>
> _______________________________________________
> gnucash-patches mailing list
> gnucash-patches at gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-patches

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord at MIT.EDU                        PGP key available


More information about the gnucash-patches mailing list