[Mailman-Developers] semantic error in mailmanctl line 255(Mailman 2.1.2)

Oliver Egginger Oliver.Egginger at dvz.fh-giessen.de
Thu May 15 09:29:51 EDT 2003


> >
> > Here is the diff for a patch:
> > 255c255
> > <     os.execl(mm_cfg.PYTHON, '' , exe, rswitch, '-s')
> > ---
> >>     os.execl(mm_cfg.PYTHON, 'qrunner', exe, rswitch, '-s')
> >
> >
> > This bug breaks several python installations.
> > It don't work for my Mandrake system for example.
> 
> I'd like to understand better what exactly breaks on Mandrake.  
> Certainly, I've never had a problem on various Redhati.  AFAIK, that 
> argument is mostly for process listings, e.g. ps and doesn't have any 
> semantic value.


>From my understanding the first argument (argv[0]) of a program, which
gets called by os.execl, should always yield the name of this programm.
For example:

os.execl(mm_cfg.PYTHON, mm_cfg.PYTHON , exe, rswitch, '-s')
os.execl(mm_cfg.PYTHON, 'python' , exe, rswitch, '-s')
or
os.execl(exe , exe, rswitch, '-s')

should work.
The corresponding C systemcalls gets normally used this way.

Furthermore the first suggestion
os.execl(mm_cfg.PYTHON, '' , exe, rswitch, '-s')
should work too but in the meantime I would prefer one of the 
three versions above.



> 
> > It is possible to correct this in future releases?
> > What do you think?
> 
> As you can tell by the comment just preceding these lines, I've thought 
> about different values for argv0 and settled on 'qrunner' because it 
> looks the best to me when I do a ps listing.  On my RH9 system, if I 
> use the empty string, then it eats arg1.  So I'd consider using 
> mm_cfg.PYTHON, but then the command line gets pretty long.  'qrunner' 
> just looks the best so I'm disinclined to change that unless it fixes a 
> real bug.
> 

os.execl(mm_cfg.PYTHON, 'qrunner', exe, rswitch, '-s')

crashs on my system with:
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>

Then it breaks with the error message:
ImportError: No module named getopt
  File "/home/mailman/bin/qrunner", line 72, in ?
    import getopt
ImportError: No module named getopt

The messages gets repreatet several times then it breaks
completely.

The suggested modification solve this problem.
The Qrunners starts up and everything seems to work normal.

The only eye-catching thing is that I receive some error messages
in the verbose mode during the qrunners starting up.
I think this is another problem but maybe it gives you a hint.
Here is one of them:

# clear __builtin__._
Logging error: <StampedLogger to '/home/mailman/logs/error'>
Traceback (most recent call last):
  File "/home/mailman/Mailman/Logging/MultiLogger.py", line 43, in write
    logger.write(msg)
  File "/home/mailman/Mailman/Logging/StampedLogger.py", line 73, in write
    Logger.write(self, "%s %s" % (prefix, msg))
  File "/home/mailman/Mailman/Logging/Logger.py", line 88, in write
    msg = unicode(msg, self.__encoding)
SystemError: codec module not properly initialized
Original log message:
# clear __builtin__._


Nevertheless Mailman seems to work normal.

- oliver 







More information about the Mailman-Developers mailing list