Calling All Twisted Daemon Experts

…I know…most metal blog post title ever, right?

I wanted to ask for some guidance from some of you Twisted Python folks. I have written the backend process for Ubuntu Accomplishments using Twisted, and everything is running all nice and async.

As I build towards getting my work into a state that I can package, I need to turn my backend process into a real service that can be started automatically when the user logs in. To do this I believe I need to make this a real daemon that can be started, stopped, and restarted, and works as a background process.

So, essentially I want to convert my existing Twisted process into a daemon. You can read the code here to see what I have done with Twisted, and the branch is lp:ubuntu-accomplishments-system.

Any advice would be wonderful. Thanks!

  • Dustin Kirkland

    Hey Jono,

    Have a look at this answer I posted on StackExchange a few weeks ago, as I was looking for something very similar to you.  I didn’t find exactly what I was looking for, so I posted it here:


  • Jean-Paul Calderone

    Use twistd ( and write a plugin (better, or a tac file (still okay, to glue it to your application.

    twistd provides daemonization as well as reactor selection, logging configuration, privilege shedding, debugger integration, profiling, and several other esoteric platform-specific runtime configuration options.

  • Titunew_2006

    if($_POST['submit']) { $messagesql = “INSERT INTO messages(date, user_id, topic_id, subject, body) VALUES(NOW() , ” . $_SESSION['USERID'] . “, ” . $validtopic . “, ‘” . $_POST['subject'] . “‘, ‘” . $_POST['body'] . “‘);”; mysql_query($messagesql); header(“Location: ” . $config_basedir . “viewmessages.php?id=” . $validtopic); } else { require(“header.php”);  not working