From e6012a8fd29d9969cc19a498bcaddc549925249f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Wed, 2 Oct 2013 04:52:18 +0200 Subject: [PATCH] Fix qubes.xml unlock code (#748) Do not call explicit lockf(lOCK_UN) to not unlock the file buffers are flushed. This is simpler than adding flush() call. --- core/qubes.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/qubes.py b/core/qubes.py index 2e21d6f7..2fcbb8d7 100755 --- a/core/qubes.py +++ b/core/qubes.py @@ -492,7 +492,8 @@ class QubesVmCollection(dict): fcntl.lockf (self.qubes_store_file, fcntl.LOCK_EX) def unlock_db(self): - fcntl.lockf (self.qubes_store_file, fcntl.LOCK_UN) + # intentionally do not call explicit unlock to not unlock the file + # before all buffers are flushed self.qubes_store_file.close() def save(self):