diff options
author | Rob Austein <sra@hactrn.net> | 2013-04-26 20:22:01 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2013-04-26 20:22:01 +0000 |
commit | 0e071680dd9340d6c043ae08c974ba319dbd0e52 (patch) | |
tree | c9a269e51d571bc88a05df8c36a83e23c05df6de | |
parent | 63778293fffbaa50f175da2d652d85a8ff3da832 (diff) |
Loading setproctitle dumps core when running under WSGI and Apache, so
don't try. Closes #520.
svn path=/trunk/; revision=5310
-rw-r--r-- | rpkid/portal-gui/rpki.wsgi | 7 | ||||
-rw-r--r-- | rpkid/rpki/log.py | 8 |
2 files changed, 12 insertions, 3 deletions
diff --git a/rpkid/portal-gui/rpki.wsgi b/rpkid/portal-gui/rpki.wsgi index 37bed594..a01bf8f7 100644 --- a/rpkid/portal-gui/rpki.wsgi +++ b/rpkid/portal-gui/rpki.wsgi @@ -25,6 +25,13 @@ os.environ['DJANGO_SETTINGS_MODULE'] = 'rpki.gui.default_settings' # needed for local_settings.py sys.path.insert(1, rpki.autoconf.sysconfdir + '/rpki') +# Kludge to disable use of setproctitle in rpki.log. For reasons +# unknown, at least on Ubuntu 12.04 LTS, we dump core with a segment +# violation if we try to load that module in this process, even though +# it works fine in other processes on the same system. Not yet sure +# what this is about, just disable setproctitle in WSGI case for now. +os.environ['DISABLE_SETPROCTITLE'] = 'yes' + import django.core.handlers.wsgi application = django.core.handlers.wsgi.WSGIHandler() diff --git a/rpkid/rpki/log.py b/rpkid/rpki/log.py index 558d3c68..cc2babcc 100644 --- a/rpkid/rpki/log.py +++ b/rpkid/rpki/log.py @@ -39,10 +39,12 @@ import time import traceback as tb try: - import setproctitle - have_setproctitle = True -except ImportError: have_setproctitle = False + if os.getenv("DISABLE_SETPROCTITLE") is None: + import setproctitle + have_setproctitle = True +except ImportError: + pass ## @var enable_trace # Whether call tracing is enabled. |