On Sat, Dec 02, 2006 at 05:13:14PM -0500, Chris Shoemaker wrote: > Author: chris > Date: 2006-12-02 17:13:13 -0500 (Sat, 02 Dec 2006) > New Revision: 15168 > Trac: http://svn.gnucash.org/trac/changeset/15168 > > Modified: > gnucash/trunk/lib/libqof/qof/qofsession-p.h > gnucash/trunk/lib/libqof/qof/qofsession.c > gnucash/trunk/lib/libqof/qof/qofsession.h > gnucash/trunk/src/gnome-utils/gnc-file.c > Log: > Fix bug #353450 - Crash on quit during save. > > Add a lock to the QofSession object, and use it in qof_session_save() to > protect against re-entrance. > > The lock always starts at 1 and is 0 while inside qof_session_save(). > If another call is made to qof_session_save() while one is in progress, > the lock will momentarily drop below 0 before returning to zero. > > Note: The per-session nature of the lock would make it appear that we support > concurrent saving of different sessions. In fact, we do not, because the > file backend blocks the main process until the forked gzip process is > finished, and it only knows how to keep track of one child pid at a time. >
I meant to request this for backport. However, because of the imminence of the 2.0.3 release, and because of the nature of the change, I'm requesting that this changeset not be backported until at least 2 devs approve it. Note that the solution I implemented is different from what I was describing in IRC at times. -chris _______________________________________________ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel