close issue #66. Display a more explicit error message and raise.

This commit is contained in:
benoitc 2010-06-30 04:58:26 +02:00
parent 46e8002ffc
commit 5d9de13b59

View File

@ -107,7 +107,14 @@ class Application(object):
if self.cfg.daemon:
util.daemonize()
else:
os.setpgrp()
try:
os.setpgrp()
except OSError, e:
if e[0] == errno.EPERM:
sys.stderr.write("Error: You should use "
"daemon mode here.\n")
raise
self.configure_logging()
Arbiter(self).run()