[utils] Use flock instead of lockf (Fixes #3621)
This commit is contained in:
		@@ -1141,10 +1141,10 @@ else:
 | 
				
			|||||||
    import fcntl
 | 
					    import fcntl
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def _lock_file(f, exclusive):
 | 
					    def _lock_file(f, exclusive):
 | 
				
			||||||
        fcntl.lockf(f, fcntl.LOCK_EX if exclusive else fcntl.LOCK_SH)
 | 
					        fcntl.flock(f, fcntl.LOCK_EX if exclusive else fcntl.LOCK_SH)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def _unlock_file(f):
 | 
					    def _unlock_file(f):
 | 
				
			||||||
        fcntl.lockf(f, fcntl.LOCK_UN)
 | 
					        fcntl.flock(f, fcntl.LOCK_UN)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class locked_file(object):
 | 
					class locked_file(object):
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user