[Zodb-checkins] CVS: Zope/lib/python/zdaemon - Daemon.py:1.3.12.1
Toby Dickenson
tdickenson@geminidataloggers.com
Mon, 11 Mar 2002 09:12:55 -0500
Update of /cvs-repository/Zope/lib/python/zdaemon
In directory cvs.zope.org:/tmp/cvs-serv25442/lib/python/zdaemon
Modified Files:
Tag: toby-daemon-close-file-branch
Daemon.py
Log Message:
Collector #10 and #277, zdaemon redirecting stdin/stdout/stderr to /dev/null
=== Zope/lib/python/zdaemon/Daemon.py 1.3 => 1.3.12.1 ===
if pid:
sys.exit(0)
+ posix.close(0); sys.stdin = open('/dev/null')
+ posix.close(1); sys.stdout = open('/dev/null','w')
+ posix.close(2); sys.stderr = open('/dev/null','w')
posix.setsid()
while 1: