[Zope-ZEO] ZEO patches for NT

Jim Fulton jim@digicool.com
Mon, 10 Jul 2000 09:22:05 -0400


Jeffrey Kunce wrote:
> 
> I've been testing standalone  ZEO (without ZOPE) on  NT.
> Three changes I needed to make:
> 
> 1) In start.py, change line 211 from:
>     open(zeo_pid,'w').write("%s %s" % (os.getppid(), os.getpid()))
> to:
>     open(zeo_pid,'w').write("%s %s" % (os.getpid(), os.getpid()))

I'm not sure what value the PID file has on NT in the first place.
Does NT have anything like the Unix kill command that lets
you stop a process if you know it's process number?

I suspect it would make more sense to (have an option to) run the 
server as an NT service. Anyone want to volunteer to set that up?

In the mean time, it would probably be good enough to just not write the
pid file if you can't get ppid. I'll change this.

> I believe Júlio did the same or similar. I'm not sure if this is the *correct*
> solution, but it seems to work [os.getppid() definitely does not].
> I recommend a platform check at that point in the code.
> 
> 2)  In smac.py, change line 91 from:
>     from zLOG import LOG, TRACE, ERROR
> to:
>     from zLOG import LOG, TRACE, ERROR, INFO
> 
> the INFO global is used (in some situations) in line 193
 
Dang. OK.

> 3)  In smac.py, replace line 90:
>     import asyncore, string, struct, zLOG, sys, Acquisition
> with these two lines:
>     from ZServer.medusa import asyncore
>     import string, struct, zLOG, sys, Acquisition

I don't want to introduce a dependency on ZServer.

> For some reason, simply copying asyncore.pyc from Zserver/medusa/
> (as recommended in the Readme) did not work for me,

How about copying asyncore.py?  Where did you get an error, 
in the server, or in the client? I assume the server.
I'll look into this.

Jim

--
Jim Fulton           mailto:jim@digicool.com   Python Powered!        
Technical Director   (888) 344-4332            http://www.python.org  
Digital Creations    http://www.digicool.com   http://www.zope.org    

Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email
address may not be added to any commercial mail list with out my
permission.  Violation of my privacy with advertising or SPAM will
result in a suit for a MINIMUM of $500 damages/incident, $1500 for
repeats.