[Zope-Checkins] CVS: Zope/lib/python/Zope/Startup/nt - NTService.py:1.9

Chris McDonough chrism@zope.com
Sun, 6 Jul 2003 21:20:58 -0400


Update of /cvs-repository/Zope/lib/python/Zope/Startup/nt
In directory cvs.zope.org:/tmp/cvs-serv5838

Modified Files:
	NTService.py 
Log Message:
Really shutdown if we exit with status 0.


=== Zope/lib/python/Zope/Startup/nt/NTService.py 1.8 => 1.9 ===
--- Zope/lib/python/Zope/Startup/nt/NTService.py:1.8	Sun Jul  6 21:11:31 2003
+++ Zope/lib/python/Zope/Startup/nt/NTService.py	Sun Jul  6 21:20:53 2003
@@ -124,7 +124,11 @@
                 # user did not send a service stop request, but
                 # the process died; this may be an error condition
                 status = win32process.GetExitCodeProcess(self.hZope)
-                if status != 0:
+                if status == 0:
+                    # the user shut the process down from the web
+                    # interface (or it otherwise exited cleanly)
+                    break
+                else:
                     # this was an abormal shutdown.  if we can, we want to
                     # restart the process but if it seems hopeless,
                     # don't restart an infinite number of times.