From 91b0e46d75b16a20ff67943103f9beb5f7916471 Mon Sep 17 00:00:00 2001 From: Aaron Swartz Date: Fri, 30 Jan 2004 12:01:00 +0000 Subject: [PATCH] Add rss2email v2.24 Possible fix for process leak. Tx Alan Danziger. Downloaded from: http://web.archive.org/web/20040416223252/http://www.aaronsw.com/2002/rss2email/rss2email-2.24.py --- rss2email.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/rss2email.py b/rss2email.py index 37c05fd..9717177 100644 --- a/rss2email.py +++ b/rss2email.py @@ -12,7 +12,7 @@ Usage: python rss2email.py feedfile action [options] list delete n """ -__version__ = "2.23" +__version__ = "2.24" __author__ = "Aaron Swartz (me@aaronsw.com)" __copyright__ = "(C) 2004 Aaron Swartz. GNU GPL 2." ___contributors__ = ["Dean Jackson (dino@grorg.org)", @@ -38,7 +38,10 @@ TREAT_DESCRIPTION_AS_HTML = 1 QP_REQUIRED = 0 def send(fr, to, message): - os.popen2(["/usr/sbin/sendmail", to])[0].write(message) + i, o = os.popen2(["/usr/sbin/sendmail", to]) + i.write(message) + i.close(); o.close() + del i, o # def send(fr, to, message): # import smtplib -- 2.26.2