summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbwarsaw2003-05-15 15:12:22 +0000
committerbwarsaw2003-05-15 15:12:22 +0000
commitfe9724c9a19929a1ca790673940faf9279c9719e (patch)
tree5896870333e26ee9b69b22ae304c2fceb3cbd85f
parent209d05e8a4e271576a6a2e55622c70178d92e258 (diff)
downloadmailman-fe9724c9a19929a1ca790673940faf9279c9719e.tar.gz
mailman-fe9724c9a19929a1ca790673940faf9279c9719e.tar.zst
mailman-fe9724c9a19929a1ca790673940faf9279c9719e.zip
start_runner(): mm_cfg.PYTHON should be used in the execl() argv[0]
slot, since argv[0] is used by the Python interpreter to define its library search paths. Depending on various and sundry environmental issues ($PATH, --prefix, --exec-prefix, etc.) it can still work fine, but this guarantees the right libraries will be found for the version of Python being used. Bug fix candidate.
-rw-r--r--bin/mailmanctl5
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/mailmanctl b/bin/mailmanctl
index 1243dbd41..4ebeb8362 100644
--- a/bin/mailmanctl
+++ b/bin/mailmanctl
@@ -250,9 +250,10 @@ def start_runner(qrname, slice, count):
#
# Craft the command line arguments for the exec() call.
rswitch = '--runner=%s:%d:%d' % (qrname, slice, count)
- # BAW: should argv[0] be `python'?
exe = os.path.join(mm_cfg.BIN_DIR, 'qrunner')
- os.execl(mm_cfg.PYTHON, 'qrunner', exe, rswitch, '-s')
+ # mm_cfg.PYTHON, which is the absolute path to the Python interpreter,
+ # must be given as argv[0] due to Python's library search algorithm.
+ os.execl(mm_cfg.PYTHON, mm_cfg.PYTHON, exe, rswitch, '-s')
# Should never get here
raise RuntimeError, 'os.execl() failed'