[Zodb-checkins] CVS: ZEO/ZEO/tests - forker.py:1.10.4.7

Jeremy Hylton jeremy@zope.com
Tue, 29 Jan 2002 09:35:34 -0500


Update of /cvs-repository/ZEO/ZEO/tests
In directory cvs.zope.org:/tmp/cvs-serv6076

Modified Files:
      Tag: Standby-branch
	forker.py 
Log Message:
Make start_zeo_server() consist across platforms.

On Windows, make sure modified environment is passed to spawn.


=== ZEO/ZEO/tests/forker.py 1.10.4.6 => 1.10.4.7 ===
         d = os.environ.copy()
         d['PYTHONPATH'] = os.pathsep.join(sys.path)
-        pid = os.spawnve(os.P_NOWAIT, sys.executable, args, os.environ)
+        pid = os.spawnve(os.P_NOWAIT, sys.executable, args, d)
         return ('localhost', port), ('localhost', port + 1), pid
 
 else:
@@ -97,7 +97,7 @@
             except os.error:
                 pass
 
-    def start_zeo_server(addr, storage_name, args):
+    def start_zeo_server(storage_name, args, addr):
         assert isinstance(args, types.TupleType)
         rd, wr = os.pipe()
         pid = os.fork()
@@ -156,7 +156,7 @@
         else:
             raise ValueError, "bad domain: %s" % domain
 
-        pid, exit = start_zeo_server(addr, storage_name, args)
+        pid, exit = start_zeo_server(storage_name, args, addr)
         s = ZEO.ClientStorage.ClientStorage(addr, storage_id,
                                             debug=1, client=cache,
                                             cache_size=cache_size,