core: import monitorlayoutnotify instead of calling it as external script
Otherwise deadlock could happen - the script will try to get read lock on qubes.xml, while the calling tool can already hold the lock. If that was write lock (which is in case of qfile-daemon-dvm), the deadlock occurs.
This commit is contained in:
parent
ce716f9c5a
commit
592a4901c9
@ -1544,12 +1544,13 @@ class QubesVm(object):
|
||||
if (retcode != 0) :
|
||||
raise QubesException("Cannot start qubes-guid!")
|
||||
|
||||
if verbose:
|
||||
print >> sys.stderr, "--> Sending monitor layout..."
|
||||
|
||||
try:
|
||||
subprocess.call([system_path["monitor_layout_notify_cmd"], self.name])
|
||||
except Exception as e:
|
||||
import qubes.monitorlayoutnotify
|
||||
if verbose:
|
||||
print >> sys.stderr, "--> Sending monitor layout..."
|
||||
monitor_layout = qubes.monitorlayoutnotify.get_monitor_layout()
|
||||
qubes.monitorlayoutnotify.notify_vm(self, monitor_layout)
|
||||
except ImportError as e:
|
||||
print >>sys.stderr, "ERROR: %s" % e
|
||||
|
||||
if verbose:
|
||||
|
@ -81,7 +81,6 @@ system_path = {
|
||||
|
||||
'qubes_pciback_cmd': '/usr/lib/qubes/unbind-pci-device.sh',
|
||||
'prepare_volatile_img_cmd': '/usr/lib/qubes/prepare-volatile-img.sh',
|
||||
'monitor_layout_notify_cmd': '/usr/bin/qubes-monitor-layout-notify',
|
||||
}
|
||||
|
||||
vm_files = {
|
||||
|
Loading…
Reference in New Issue
Block a user