Kern Sibbald wrote: > As it stands, the current patch that you have submitted will not work > correctly since two threads can be terminating at the same time, and the > write_state_file() code is not thread safe. You can probably correct it by > moving the jcr chain lock.
OK. Actually, that's quite interesting .... in the current (unpatched) code, last_jobs is updated in free_common_jcr(), which is called from free_jcr() a few lines below the call of unlock_jcr_chain() .... so does that mean the code to update last_jobs has the same problem? dlists don't seem to have their own locks. In addition, as you note, you need to do > something so that the state file is not updated more frequently than really > necessary. Yes, now I think about it, I can see how to do that quite easily. Allan > On Wednesday 22 August 2007 14:17, Allan Black wrote: >> - Can we write the state file after every job terminates? On Win32 >> the system crashes and the state file is not updated. ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Bacula-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/bacula-devel
