------------------------------------------------------------
revno: 1094
committer: Mark Sapiro <[email protected]>
branch nick: 2.2
timestamp: Mon 2010-02-15 10:58:31 -0800
message:
When daemonizing mailmanctl, we now ensure terminal files are closed.
modified:
NEWS
bin/mailmanctl
--
lp:mailman/2.2
https://code.launchpad.net/~mailman-coders/mailman/2.2
Your team Mailman Checkins is subscribed to branch lp:mailman/2.2.
To unsubscribe from this branch go to
https://code.launchpad.net/~mailman-coders/mailman/2.2/+edit-subscription.
=== modified file 'NEWS'
--- NEWS 2010-02-13 21:51:10 +0000
+++ NEWS 2010-02-15 18:58:31 +0000
@@ -82,6 +82,9 @@
Bug #500952 and Bug #500955.
Bug Fixes and other patches
+
+ - When daemonizing mailmanctl, we now ensure terminal files are closed.
+
- Fixed a bug in pipermail archiving that caused fallback threading by
subject to fail. Bug #266572.
=== modified file 'bin/mailmanctl'
--- bin/mailmanctl 2006-02-05 04:45:09 +0000
+++ bin/mailmanctl 2010-02-15 18:58:31 +0000
@@ -1,6 +1,6 @@
#! @PYTHON@
-# Copyright (C) 2001-2006 by the Free Software Foundation, Inc.
+# Copyright (C) 2001-2010 by the Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -417,6 +417,13 @@
# won't be opening any terminal devices, don't do the ultra-paranoid
# suggestion of doing a second fork after the setsid() call.
os.setsid()
+
+ # Be sure to close any open std{in,out,err}
+ devnull = os.open('/dev/null', 0)
+ os.dup2(devnull, 0)
+ os.dup2(devnull, 1)
+ os.dup2(devnull, 2)
+
# Instead of cd'ing to root, cd to the Mailman installation home
os.chdir(mm_cfg.PREFIX)
# Set our file mode creation umask
_______________________________________________
Mailman-checkins mailing list
[email protected]
Unsubscribe:
http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org