+ lock_file, old_port = get_lock(port)
+ if lock_file:
+ open_db()
+ thread.start_new_thread(start_browser, (port,))
+ run_server(port=port)
+ close_lock(lock_file)
+ else: # Another instance of the program is being run at a different port
+ start_browser(old_port)