dom0: fix leaked file descriptor from qfile-daemon-dvm

This commit is contained in:
Marek Marczykowski 2011-06-29 19:32:49 +02:00
parent acbc6534bc
commit 49ac5aa17e

View File

@ -127,6 +127,7 @@ def main():
notify_object = dbus.SessionBus().get_object("org.freedesktop.Notifications", "/org/freedesktop/Notifications")
qfile = QfileDaemonDvm(os.getenv("QREXEC_REMOTE_DOMAIN"))
lockf = open("/var/run/qubes/qfile-daemon-dvm.lock", 'a')
fcntl.fcntl(lockf, fcntl.F_SETFD, fcntl.FD_CLOEXEC)
fcntl.flock(lockf, fcntl.LOCK_EX)
dispname = qfile.get_dvm()
lockf.close()