qubes-manager: Added call to lock.remove_pidfile() on successful exit

* Adding remove_pidfile on exit
* prevents the incorrect 'crash' message on startup
* Added proper call to main
This commit is contained in:
Bruce A Downs 2012-10-15 20:28:57 -06:00 committed by Marek Marczykowski
parent a64aab0acf
commit 3f8cd88ec0

View File

@ -2030,8 +2030,6 @@ def sighup_handler(signum, frame):
os.execl("/usr/bin/qubes-manager") os.execl("/usr/bin/qubes-manager")
def main(): def main():
# Avoid starting more than one instance of the app # Avoid starting more than one instance of the app
lock = QubesDaemonPidfile ("qubes-manager") lock = QubesDaemonPidfile ("qubes-manager")
if lock.pidfile_exists(): if lock.pidfile_exists():
@ -2084,4 +2082,9 @@ def main():
show_manager() show_manager()
app.exec_() app.exec_()
lock.remove_pidfile()
trayIcon = None trayIcon = None
if __name__ == "__main__":
main()