# HG changeset patch # User Sylvain Thénault # Date 1276069344 -7200 # Node ID 59ceed788bdb70d47a00ca602b399c5c7836229b # Parent 6de8437b06bd0ade0281f6604f55bd9b715a6cf7 [repo server] fix startup bug, lgc.daemon.daemonize return 1 for the parent process, not -1 diff -r 6de8437b06bd -r 59ceed788bdb server/server.py --- a/server/server.py Wed Jun 09 09:41:36 2010 +0200 +++ b/server/server.py Wed Jun 09 09:42:24 2010 +0200 @@ -25,8 +25,6 @@ import warnings from time import localtime, mktime -from logilab.common.daemon import daemonize - from cubicweb.cwconfig import CubicWebConfiguration from cubicweb.server.repository import Repository diff -r 6de8437b06bd -r 59ceed788bdb server/serverctl.py --- a/server/serverctl.py Wed Jun 09 09:41:36 2010 +0200 +++ b/server/serverctl.py Wed Jun 09 09:42:24 2010 +0200 @@ -539,14 +539,14 @@ debug = self.config.debug # create the server server = RepositoryServer(config, debug) - # go ! (don't daemonize in debug mode) - pidfile = config['pid-file'] # ensure the directory where the pid-file should be set exists (for # instance /var/run/cubicweb may be deleted on computer restart) + pidfile = config['pid-file'] piddir = os.path.dirname(pidfile) + # go ! (don't daemonize in debug mode) if not os.path.exists(piddir): os.makedirs(piddir) - if not debug and daemonize(pidfile) == -1: + if not debug and daemonize(pidfile): return uid = config['uid'] if uid is not None: