Change Web interface to fork by default

Implemented to match the daemon's default action and option to not fork/daemonize.
This commit is contained in:
Calum Lind 2012-03-19 21:54:50 +00:00
parent a60dc95fed
commit 04bc23abe9
2 changed files with 6 additions and 4 deletions

View File

@ -34,6 +34,9 @@
torrent's status tab. torrent's status tab.
* #2093: Make torrent opening compatible with all unicode paths. * #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 ==== ==== Blocklist Plugin ====
* #1382: Implemented whitelist support to both core and GTK UI. * #1382: Implemented whitelist support to both core and GTK UI.
* Implemented ip filter cleaning before each update. Restarting the deluge * Implemented ip filter cleaning before each update. Restarting the deluge

View File

@ -58,9 +58,8 @@ class Web(_UI):
help="Set the base path that the ui is running on (proxying)", help="Set the base path that the ui is running on (proxying)",
action="store", default=None) action="store", default=None)
if not (deluge.common.windows_check() or deluge.common.osx_check()): if not (deluge.common.windows_check() or deluge.common.osx_check()):
group.add_option("-f", "--fork", dest="fork", group.add_option("-d", "--do-not-daemonize", dest="donotdaemonize",
help="Fork the web interface process into the background", help="Do not daemonize the web interface", action="store_true", default=False)
action="store_true", default=False)
group.add_option("-P", "--pidfile", dest="pidfile", type="str", group.add_option("-P", "--pidfile", dest="pidfile", type="str",
help="Use pidfile to store process id", help="Use pidfile to store process id",
action="store", default=None) action="store", default=None)
@ -97,7 +96,7 @@ class Web(_UI):
# Steps taken from http://www.faqs.org/faqs/unix-faq/programmer/faq/ # Steps taken from http://www.faqs.org/faqs/unix-faq/programmer/faq/
# Section 1.7 # 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 # fork() so the parent can exit, returns control to the command line
# or shell invoking the program. # or shell invoking the program.
if os.fork(): if os.fork():