TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Python-Daemon - Library to implement a well-behaved Unix daemon process.

63 pointsby ramsabout 16 years ago

5 comments

tow21about 16 years ago
I tend to think this is the wrong way to go about daemonizing a process; it does the relatively easy but fiddly stuff for you, leaving you still to manage process monitoring.<p>Better to have the process neither know not care about its daemonized status, which is not really core program logic, and have the process monitor manage daemonization, à la <a href="http://cr.yp.to/daemontools.html" rel="nofollow">http://cr.yp.to/daemontools.html</a>
thristianabout 16 years ago
Twisted Python comes with its own "twistd" script to daemonize a Twisted application. Sure, not every Python daemon is written in Twisted, but most daemons talk to a TCP, UDP, or Unix socket for something, which means Twisted is a tool you're likely to be evaluating anyway.
stratomorphabout 16 years ago
I haven't tried this, but it sure looks handy. Writing a daemon is a common task, but not so often (for me, anyway) that it feels like copy-and-pasting the same boilerplate every time. So, I ignore the old rule that says "if you're going to do it more than once, write a program to do it for you". I always end up writing a one-off prototype for my own personal use, and then upgrading it to be a daemon, and I make the same Google searches every time. I'll have to try this next time.
评论 #616235 未加载
tzuryabout 16 years ago
This one is the one I use for several applications <a href="http://www.jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python/" rel="nofollow">http://www.jejik.com/articles/2007/02/a_simple_unix_linux_da...</a>
zurlaabout 16 years ago
if you're using ruby, check out daemons and especially daemon-kit which includes a nice rapleaf patch to daemons