From 04bc23abe914600cb626e5742dc64cae1824e22e Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Mon, 19 Mar 2012 21:54:50 +0000 Subject: [PATCH] Change Web interface to fork by default Implemented to match the daemon's default action and option to not fork/daemonize. --- ChangeLog | 3 +++ deluge/ui/web/web.py | 7 +++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index dff77e531..c9124bc99 100644 --- a/ChangeLog +++ b/ChangeLog @@ -34,6 +34,9 @@ torrent's status tab. * #2093: Make torrent opening compatible with all unicode paths. +==== WebUI ==== + * Server (deluge-web) now daemonizes by default, use -d or --do-not-daemonize to disable. + ==== Blocklist Plugin ==== * #1382: Implemented whitelist support to both core and GTK UI. * Implemented ip filter cleaning before each update. Restarting the deluge diff --git a/deluge/ui/web/web.py b/deluge/ui/web/web.py index fb440b9f8..40b4eb01f 100644 --- a/deluge/ui/web/web.py +++ b/deluge/ui/web/web.py @@ -58,9 +58,8 @@ class Web(_UI): help="Set the base path that the ui is running on (proxying)", action="store", default=None) if not (deluge.common.windows_check() or deluge.common.osx_check()): - group.add_option("-f", "--fork", dest="fork", - help="Fork the web interface process into the background", - action="store_true", default=False) + group.add_option("-d", "--do-not-daemonize", dest="donotdaemonize", + help="Do not daemonize the web interface", action="store_true", default=False) group.add_option("-P", "--pidfile", dest="pidfile", type="str", help="Use pidfile to store process id", action="store", default=None) @@ -97,7 +96,7 @@ class Web(_UI): # Steps taken from http://www.faqs.org/faqs/unix-faq/programmer/faq/ # Section 1.7 - if self.options.ensure_value("fork", None): + if not self.options.ensure_value("donotdaemonize", True): # fork() so the parent can exit, returns control to the command line # or shell invoking the program. if os.fork():