[Checkins] SVN: z3c.recipe.winservice/trunk/ - Set current dir for CreateProcess to INSTANCE_HOME otherwise pkg_resources will

Adam Groszer agroszer at gmail.com
Wed May 13 06:30:11 EDT 2009


Log message for revision 99886:
  - Set current dir for CreateProcess to INSTANCE_HOME otherwise pkg_resources will
    be pissed (in a combination with paster)

Changed:
  U   z3c.recipe.winservice/trunk/CHANGES.txt
  U   z3c.recipe.winservice/trunk/src/z3c/recipe/winservice/README.txt
  U   z3c.recipe.winservice/trunk/src/z3c/recipe/winservice/winservice.in

-=-
Modified: z3c.recipe.winservice/trunk/CHANGES.txt
===================================================================
--- z3c.recipe.winservice/trunk/CHANGES.txt	2009-05-13 08:17:26 UTC (rev 99885)
+++ z3c.recipe.winservice/trunk/CHANGES.txt	2009-05-13 10:30:11 UTC (rev 99886)
@@ -5,7 +5,8 @@
 Version 0.7.0 (unreleased)
 --------------------------
 
-- ...
+- Set current dir for CreateProcess to INSTANCE_HOME otherwise pkg_resources will
+  be pissed (in a combination with paster)
 
 Version 0.6.1 (2009-05-12)
 --------------------------

Modified: z3c.recipe.winservice/trunk/src/z3c/recipe/winservice/README.txt
===================================================================
--- z3c.recipe.winservice/trunk/src/z3c/recipe/winservice/README.txt	2009-05-13 08:17:26 UTC (rev 99885)
+++ z3c.recipe.winservice/trunk/src/z3c/recipe/winservice/README.txt	2009-05-13 10:30:11 UTC (rev 99886)
@@ -193,6 +193,7 @@
   SERVICE_NAME = '...sample_buildout_bin_app_script_py'
   SERVICE_DISPLAY_NAME = r'Zope 3 Windows Service'
   SERVICE_DESCRIPTION = r'Zope 3 Windows Service description'
+  INSTANCE_HOME = os.path.dirname(os.path.dirname(TOSTART))
   <BLANKLINE>
   <BLANKLINE>
   # the max seconds we're allowed to spend backing off
@@ -296,8 +297,11 @@
       SvcShutdown = SvcStop
   <BLANKLINE>
       def createProcess(self, cmd):
+          #need to set current dir to INSTANCE_HOME otherwise pkg_resources will
+          #be pissed (in a combination with paster)
           return win32process.CreateProcess(
-              None, cmd, None, None, 0, 0, None, None,
+              None, cmd, None, None, 0, 0, None,
+              INSTANCE_HOME,
               win32process.STARTUPINFO())
   <BLANKLINE>
       def SvcDoRun(self):

Modified: z3c.recipe.winservice/trunk/src/z3c/recipe/winservice/winservice.in
===================================================================
--- z3c.recipe.winservice/trunk/src/z3c/recipe/winservice/winservice.in	2009-05-13 08:17:26 UTC (rev 99885)
+++ z3c.recipe.winservice/trunk/src/z3c/recipe/winservice/winservice.in	2009-05-13 10:30:11 UTC (rev 99886)
@@ -92,6 +92,7 @@
 SERVICE_NAME = '<<SERVICE_NAME>>'
 SERVICE_DISPLAY_NAME = r'<<SERVICE_DISPLAY_NAME>>'
 SERVICE_DESCRIPTION = r'<<SERVICE_DESCRIPTION>>'
+INSTANCE_HOME = os.path.dirname(os.path.dirname(TOSTART))
 
 
 # the max seconds we're allowed to spend backing off
@@ -195,8 +196,11 @@
     SvcShutdown = SvcStop
 
     def createProcess(self, cmd):
+        #need to set current dir to INSTANCE_HOME otherwise pkg_resources will
+        #be pissed (in a combination with paster)
         return win32process.CreateProcess(
-            None, cmd, None, None, 0, 0, None, None,
+            None, cmd, None, None, 0, 0, None,
+            INSTANCE_HOME,
             win32process.STARTUPINFO())
 
     def SvcDoRun(self):



More information about the Checkins mailing list