[Zope-Checkins] CVS: Zope/lib/python/Zope/Startup/nt - NTService.py:1.4.8.4
Chris McDonough
chrism@zope.com
Sun, 6 Jul 2003 21:12:22 -0400
Update of /cvs-repository/Zope/lib/python/Zope/Startup/nt
In directory cvs.zope.org:/tmp/cvs-serv4593
Modified Files:
Tag: Zope-2_7-branch
NTService.py
Log Message:
Set ZMANAGED envvar to allow Zope restart from control panel when running as ser
vice.
=== Zope/lib/python/Zope/Startup/nt/NTService.py 1.4.8.3 => 1.4.8.4 ===
--- Zope/lib/python/Zope/Startup/nt/NTService.py:1.4.8.3 Sun Jul 6 18:53:12 2003
+++ Zope/lib/python/Zope/Startup/nt/NTService.py Sun Jul 6 21:12:17 2003
@@ -20,6 +20,7 @@
import win32process
import pywintypes
import time
+import os
# the max seconds we're allowed to spend backing off
BACKOFF_MAX = 300
@@ -72,6 +73,9 @@
win32process.STARTUPINFO())
def SvcDoRun(self):
+ # indicate to Zope that the process is daemon managed (restartable)
+ os.environ['ZMANAGED'] = '1'
+
# daemon behavior: we want to to restart the process if it
# dies, but if it dies too many times, we need to give up.