Commit 4958b41e authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

daemon.GenericMain: Don't generate backtrace on conflicting daemons



Instead, print a nicer error message. This should fix issue 200.
Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent b6522276
......@@ -687,7 +687,12 @@ def GenericMain(daemon_name, optionparser,
signal.signal(signal.SIGHUP,
compat.partial(_HandleSigHup, [log_reopen_fn, stdio_reopen_fn]))
utils.WritePidFile(utils.DaemonPidFileName(daemon_name))
try:
utils.WritePidFile(utils.DaemonPidFileName(daemon_name))
except errors.PidFileLockError, err:
print >> sys.stderr, "Error while locking PID file:\n%s" % err
sys.exit(constants.EXIT_FAILURE)
try:
try:
logging.info("%s daemon startup", daemon_name)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment