Update of /cvsroot/mailman/mailman3/bin
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv994

Modified Files:
        mailmanctl 
Log Message:
start_runner(): Pass the -q option  down to the qrunner subprocesses.  Also
log the start commands at info level instead of debug level.

main(): Comment out the stdin/stdout/stderr manipulations again.  It just
isn't right yet and it hinders debugging.


Index: mailmanctl
===================================================================
RCS file: /cvsroot/mailman/mailman3/bin/mailmanctl,v
retrieving revision 3.5
retrieving revision 3.6
diff -u -d -r3.5 -r3.6
--- mailmanctl  1 May 2004 17:51:38 -0000       3.5
+++ mailmanctl  1 May 2004 18:30:37 -0000       3.6
@@ -134,12 +134,14 @@
     # Craft the command line arguments for the exec() call.
     args = ['--runner=%s:%d' % (qrname, slice)]
     args.extend(['-s', '-l'])
+    if options.quiet:
+        args.append('-q')
     args.extend(['-C', options.configfile])
     qrexe = os.path.join(configuration.layout.bindir, 'qrunner')
     pyexe = configuration.qrunner.pythonexe
     # 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.
-    log.debug('mailmanctl starting qrunner: %s %s', qrexe, args)
+    log.info('mailmanctl starting qrunner: %s %s', qrexe, args)
     os.execl(pyexe, pyexe, qrexe, *tuple(args))
     # Should never get here
     raise RuntimeError, 'os.execl() failed'
@@ -361,28 +363,28 @@
         fp.flush()
         fp.close()
         # Close stdin, stdout, and stderr and point them at /dev/null.
-        os.close(0)
-        sys.stdin = sys.__stdin__ = open('/dev/null')
-        os.close(1)
-        os.close(2)
-        # We want to log all exception that occur in this daemon to a log
-        # file, but we can't use the mailman.error logger.  I don't know why,
-        # but such messages simply get lost.
-        class LogWrapper:
-            def __init__(self):
-                # This doesn't work
-                #self._log = logging.getLogger('mailman.error')
-                path = os.path.join(configuration.layout.logdir,
-                                    'mailmanctl.log')
-                self._fp = open(path, 'a')
-            def write(self, s):
-                # This doesn't work
-                #self._log.exception(s)
-                self._fp.write(s)
-                self._fp.flush()
-        daemonlog = LogWrapper()
-        sys.stderr = sys.__stderr__ = daemonlog
-        sys.stdout = sys.__stdout__ = daemonlog
+##        os.close(0)
+##        sys.stdin = sys.__stdin__ = open('/dev/null')
+##        os.close(1)
+##        os.close(2)
+##        # We want to log all exception that occur in this daemon to a log
+##        # file, but we can't use the mailman.error logger.  I don't know why,
+##        # but such messages simply get lost.
+##        class LogWrapper:
+##            def __init__(self):
+##                # This doesn't work
+##                #self._log = logging.getLogger('mailman.error')
+##                path = os.path.join(configuration.layout.logdir,
+##                                    'mailmanctl.log')
+##                self._fp = open(path, 'a')
+##            def write(self, s):
+##                # This doesn't work
+##                #self._log.exception(s)
+##                self._fp.write(s)
+##                self._fp.flush()
+##        daemonlog = LogWrapper()
+##        sys.stderr = sys.__stderr__ = daemonlog
+##        sys.stdout = sys.__stdout__ = daemonlog
         # Create a new session and become the session leader, but since we
         # won't be opening any terminal devices, don't do the ultra-paranoid
         # suggestion of doing a second fork after the setsid() call.


_______________________________________________
Mailman-checkins mailing list
[EMAIL PROTECTED]
Unsubscribe: http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org

Reply via email to