From 3666d6ced9daf58a8143b840245b8524c9f7394b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Sat, 9 Nov 2013 18:56:08 +0100 Subject: [PATCH] backup: wait for process termination in restore header phase One more race condition, which could cause qvm-backup-restore hang. --- core/qubesutils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/qubesutils.py b/core/qubesutils.py index 2f1167b7..f24cc7d7 100644 --- a/core/qubesutils.py +++ b/core/qubesutils.py @@ -1630,9 +1630,9 @@ def backup_restore_header(restore_target, passphrase, encrypt=False, appvm=None) tarhead_command.wait() if encryptor: - if encryptor.poll() != 0: + if encryptor.wait() != 0: raise QubesException("ERROR: unable to decrypt file {0}".format(filename)) - if tarhead_command.poll() != 0: + if tarhead_command.wait() != 0: raise QubesException("ERROR: unable to extract the qubes.xml file. Is archive encrypted?") return (backup_tmpdir,"qubes.xml")