Commit 457cfb88 authored by Guido van Rossum's avatar Guido van Rossum

When running under zdaemon, chdir into var directory. Log success or

failure of chdir.
parent 6827c280
...@@ -95,7 +95,7 @@ def main(argv): ...@@ -95,7 +95,7 @@ def main(argv):
sys.path.insert(0, directory(me, 2)) sys.path.insert(0, directory(me, 2))
global LOG, INFO, ERROR global LOG, INFO, ERROR
from zLOG import LOG, INFO, ERROR, PANIC from zLOG import LOG, INFO, WARNING, ERROR, PANIC
from ZEO.util import Environment from ZEO.util import Environment
env = Environment(me) env = Environment(me)
...@@ -223,6 +223,15 @@ def main(argv): ...@@ -223,6 +223,15 @@ def main(argv):
try: try:
if Z:
# Change current directory (for core dumps etc.)
try:
os.chdir(env.var)
except os.error:
LOG('ZEO/start.py', WARNING, "Couldn't chdir to %s" % env.var)
else:
LOG('ZEO/start.py', INFO, "Changed directory to %s" % env.var)
import ZEO.StorageServer, asyncore import ZEO.StorageServer, asyncore
storages = {} storages = {}
......
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