13 May
                
                    2007
                
            
            
                13 May
                
                '07
                
            
            
            
        
    
                7:27 p.m.
            
        On Sun, 2007-05-13 at 10:07 -0600, Kyle Wheeler wrote:
On Sunday, May 13 at 09:57 AM, quoth Kyle Wheeler:
On Sunday, May 13 at 06:27 PM, quoth Timo Sirainen:
Only one of them needs to regenerate the file. The rest of them should just copy it to their login_dir.
Hmm, okay. How do they know when the file is fully regenerated?
Oh! I think I see; file_try_lock() blocks until the lock is obtained or fails, correct?
No. It goes something like this:
- see if global ssl-parameters.dat's mtime is higher than in login dir
- if yes, copy the file to login dir preserving its mtime
 
 - check if login/ssl-parameters.dat's mtime is older than configured
regeneration time
- if not, try again in 10 mins
 
 - open ssl-parameters.dat.tmp file
 - try to lock it
- if it fails someone's already rebuilding it. check again in 10 mins.
 
 - write the new parameters to the .tmp file
 - rename() .tmp to ssl-parameters.dat
 - copy to login/
 
So the processes that failed to lock the .tmp file will just copy the ssl-parameters.dat after 10 minutes.