[ZODB-Dev] ZEO question

Jim Fulton jim@digicool.com
Fri, 23 Mar 2001 08:37:26 -0500


Chris Withers wrote:
> 
> Now on the right list, I hope :-)
> 
> Here's my setup:
> 
> -WinNT 4.0
> -Zope 2.3.1b1
> -ZEO 0.4.1
> 
> But I get this:
> 
> E:\Zope\2.3.1b1>python lib/python/ZEO/start.py -p 8000
> Traceback (innermost last):
>   File "lib/python/ZEO/start.py", line 315, in ?
>     if __name__=='__main__': main(sys.argv)
>   File "lib/python/ZEO/start.py", line 297, in main
>     signal.signal(signal.SIGHUP, handler)
> AttributeError: SIGHUP
> 
> What does that mean and how can I fix it?

It means you aren't running Unix/Linux aznd it means that I 
forgot to change a finally to an except.

Actually, I'm surprised you got this far into the signal handling
setup code.  Is there a way to send signals on windows? There must
be I suppose. This code is there to get ZEO to shutdown gracefully
when killed via a signal (unix kill command).

You could change the finally on the next line to an except.
If there *is* a way to send a signal to shutdown a process
under windows, then it might make sense to catch and ignore the SIGHUP
setup.

OTOH, someone should probably turn the ZEO server into an NT service.

> Also, how can I get the storage server to use the Data.fs from my
> INSTANCE_HOME rather than the SOFTWARE_HOME, which I presume the above does?

It guesses that INSTANCE_HOME is four directories above the script. (SOFTWARE_HOME
is typically only two directories up.) You can set the INSTANCE_HOME environment
variable to specify a specific directory. You can also provide 
"INSTANCE_HOME=somedir" as a command-line option.

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