Commit 07b89a02 authored by Chris Withers's avatar Chris Withers

Fix for LP #61446: running zopectl in interactive mode on Windows exited after...

Fix for LP #61446: running zopectl in interactive mode on Windows exited after start/stop/install/remove commands were issued.
parent 022292ab
...@@ -83,7 +83,8 @@ if sys.platform[:3].lower() == "win": ...@@ -83,7 +83,8 @@ if sys.platform[:3].lower() == "win":
argv=argv, argv=argv,
) )
return err,InstanceService self.InstanceClass = InstanceService
return err
return inner return inner
...@@ -238,7 +239,7 @@ class ZopeCmd(ZDCmd): ...@@ -238,7 +239,7 @@ class ZopeCmd(ZDCmd):
# Add extra commands to install and remove the Windows service # Add extra commands to install and remove the Windows service
def do_install(self,arg): def do_install(self,arg):
err,InstanceClass = do_windows('install')(self,arg) err = do_windows('install')(self,arg)
if not err: if not err:
# If we installed successfully, put info in registry for the # If we installed successfully, put info in registry for the
# real Service class to use: # real Service class to use:
...@@ -248,12 +249,13 @@ class ZopeCmd(ZDCmd): ...@@ -248,12 +249,13 @@ class ZopeCmd(ZDCmd):
os.path.join(os.path.split(sys.argv[0])[0],'runzope'), os.path.join(os.path.split(sys.argv[0])[0],'runzope'),
self.options.configfile self.options.configfile
) )
InstanceClass.setReg('command',command) self.InstanceClass.setReg('command',command)
# This is unfortunately needed because runzope.exe is a setuptools # This is unfortunately needed because runzope.exe is a setuptools
# generated .exe that spawns off a sub process, so pid would give us # generated .exe that spawns off a sub process, so pid would give us
# the wrong event name. # the wrong event name.
InstanceClass.setReg('pid_filename',self.options.configroot.pid_filename) self.InstanceClass.setReg('pid_filename',self.options.configroot.pid_filename)
return err
def help_install(self): def help_install(self):
print "install -- Installs Zope as a Windows service." print "install -- Installs Zope as a Windows service."
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment