[Zope-Checkins] CVS: Zope/lib/python/Zope/Startup - __init__.py:1.2.2.3
Fred L. Drake, Jr.
fred@zope.com
Tue, 11 Feb 2003 15:14:17 -0500
Update of /cvs-repository/Zope/lib/python/Zope/Startup
In directory cvs.zope.org:/tmp/cvs-serv29399
Modified Files:
Tag: new-install-branch
__init__.py
Log Message:
- update handling of server factories somewhat
- don't mess with daemonizing stuff; that's handled by zdrun
=== Zope/lib/python/Zope/Startup/__init__.py 1.2.2.2 => 1.2.2.3 ===
--- Zope/lib/python/Zope/Startup/__init__.py:1.2.2.2 Thu Feb 6 16:36:31 2003
+++ Zope/lib/python/Zope/Startup/__init__.py Tue Feb 11 15:14:12 2003
@@ -107,14 +107,16 @@
'bind to the port which the server is trying to use or the '
'port may already be in use by another application.'
)
+ servers = []
for server in cfg.servers:
# create the server from the server factory
# set up in the config
try:
- server.create()
+ servers.append(server.create())
except socket.error:
raise ZConfig.ConfigurationError(socket_err
% server.servertype())
+ cfg.servers = servers
# do stuff that only applies to posix platforms (setuid, daemonizing)
if os.name == 'posix':
@@ -144,13 +146,6 @@
lock_file(LOCK_FILE)
except IOError:
pass
-
- # write pid file if zdaemon didn't do it already
- if not cfg.use_daemon_process:
- pf = open(cfg.pid_filename, 'w')
- pid='%s\n' % os.getpid()
- pf.write(pid)
- pf.close()
# now that we've successfully setuid'd, we can log to
# somewhere other than stderr. We rely on config