Index: virt-manager-0.3.0/src/virt-manager.py.in =================================================================== --- virt-manager-0.3.0.orig/src/virt-manager.py.in +++ virt-manager-0.3.0/src/virt-manager.py.in @@ -148,6 +148,8 @@ def main(): optParser = OptionParser() optParser.add_option("--profile", dest="profile", help="Generate runtime performance profile stats", metavar="FILE") optParser.set_defaults(uuid=None) + optParser.add_option("-y", "--yast", dest="fork", action="store_true", + help="Allow yast parent to exit") optParser.add_option("-c", "--connect", dest="uri", help="Connect to hypervisor at URI", metavar="URI") optParser.add_option("--no-dbus", action="store_true", dest="nodbus", @@ -199,6 +201,23 @@ def main(): logging.warning("Could not connection to session bus, disabling DBus service " + \ str(sys.exc_info()[0]) + " " + str(sys.exc_info()[1])) + if options.fork: + # Don't have to completely daemonize; just fork off and close + # stdin/stdout/stderr to let yast parent die happily. + pid = os.fork() + if pid == 0: + for fd in (0, 1, 2): + try: + os.close(fd) + except: + continue + os.open('/dev/null', os.O_RDWR) + if os.fork(): + os._exit(0) + else: + os.waitpid(pid, 0) + os._exit(0) + # Finally start the app for real show_engine(engine, options.show, options.uri, options.uuid) if options.profile != None: Index: virt-manager-0.3.0/src/virtManager/engine.py =================================================================== --- virt-manager-0.3.0.orig/src/virtManager/engine.py +++ virt-manager-0.3.0/src/virtManager/engine.py @@ -229,7 +229,7 @@ class vmmEngine: return self.connections[uri]["windowDetails"][uuid] def show_manager(self, uri): - con = self.get_connection(uri) + con = self.get_connection(uri, False) if self.connections[uri]["windowManager"] == None: manager = vmmManager(self.get_config(),