From 97c793ed16b51e9e742298cc13720fa2d4b75d0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Wojdy=C5=82a?= Date: Mon, 21 Oct 2013 16:59:19 +0200 Subject: [PATCH] QubesVm.run(): wait for client to exit on Windows --- core-modules/000QubesVm.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core-modules/000QubesVm.py b/core-modules/000QubesVm.py index 6bf76d44..ed9dfe07 100644 --- a/core-modules/000QubesVm.py +++ b/core-modules/000QubesVm.py @@ -1438,9 +1438,10 @@ class QubesVm(object): args += ["-T"] if passio: if os.name == 'nt': - # see here for the explanation (_exec doc): - # http://msdn.microsoft.com/en-us/library/431x4c1w.aspx - args[0] = '"%s"' % args[0] + # wait for qrexec-client to exit, otherwise client is not properly attached to console + # if qvm-run is executed from cmd.exe + ret = subprocess.call(args) + exit(ret) os.execv(system_path["qrexec_client_path"], args) exit(1)