From 2bdaf4f4eeed4c0268e9754893319f6b53a15b36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=A1vio=20J=2E=20Saraiva?= Date: Tue, 24 Apr 2012 15:59:37 +0100 Subject: [PATCH] Add option 'nodaemon' to buildbot start/restart. --- master/buildbot/scripts/runner.py | 2 ++ master/buildbot/scripts/start.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/master/buildbot/scripts/runner.py b/master/buildbot/scripts/runner.py index 12ff17e691d..2ef681c23e5 100644 --- a/master/buildbot/scripts/runner.py +++ b/master/buildbot/scripts/runner.py @@ -143,6 +143,7 @@ class RestartOptions(base.BasedirMixin, base.SubcommandOptions): subcommandFunction = "buildbot.scripts.restart.restart" optFlags = [ ['quiet', 'q', "Don't display startup log messages"], + ['nodaemon', None, "Don't daemonize"], ] def getSynopsis(self): return "Usage: buildbot restart []" @@ -152,6 +153,7 @@ class StartOptions(base.BasedirMixin, base.SubcommandOptions): subcommandFunction = "buildbot.scripts.start.start" optFlags = [ ['quiet', 'q', "Don't display startup log messages"], + ['nodaemon', None, "Don't daemonize"], ] def getSynopsis(self): return "Usage: buildbot start []" diff --git a/master/buildbot/scripts/start.py b/master/buildbot/scripts/start.py index 6027885a95a..4df586567b3 100644 --- a/master/buildbot/scripts/start.py +++ b/master/buildbot/scripts/start.py @@ -71,6 +71,8 @@ def launch(config): "--no_save", "--logfile=twistd.log", # windows doesn't use the same default "--python=buildbot.tac"] + if config['nodaemon']: + argv.extend(['--nodaemon']) sys.argv = argv # this is copied from bin/twistd. twisted-2.0.0 through 2.4.0 use