equal
deleted
inserted
replaced
413 if sys.platform == 'win32': |
413 if sys.platform == 'win32': |
414 raise ConfigurationError("Under windows, you must use the service management " |
414 raise ConfigurationError("Under windows, you must use the service management " |
415 "commands (e.g : 'net start my_instance)'") |
415 "commands (e.g : 'net start my_instance)'") |
416 from logilab.common.daemon import daemonize |
416 from logilab.common.daemon import daemonize |
417 LOGGER.info('instance started in the background on %s', root_resource.base_url) |
417 LOGGER.info('instance started in the background on %s', root_resource.base_url) |
418 if daemonize(config['pid-file']): |
418 whichproc = daemonize(config['pid-file']) |
419 return # child process |
419 if whichproc: # 1 = orig process, 2 = first fork, None = second fork (eg daemon process) |
|
420 return whichproc # parent process |
420 root_resource.init_publisher() # before changing uid |
421 root_resource.init_publisher() # before changing uid |
421 if config['uid'] is not None: |
422 if config['uid'] is not None: |
422 try: |
423 try: |
423 uid = int(config['uid']) |
424 uid = int(config['uid']) |
424 except ValueError: |
425 except ValueError: |