fork webui to free terminal

This commit is contained in:
Marcos Pinto 2008-09-27 21:52:00 +00:00
parent a90c709d3b
commit 5ba23ad5c2
1 changed files with 11 additions and 0 deletions

View File

@ -33,6 +33,17 @@
class WebUI:
def __init__(self, args):
import os
import sys
import deluge_webserver
if os.fork() == 0:
os.setsid()
if os.fork() == 0:
sys.stderr = sys.stdout
sys.stdin = None
else:
os._exit(0)
else:
os._exit(0)
deluge_webserver.run(debug = False)