[logo] daemon.py: daemonize function for Python

Download

To obtain my PGP/GnuPG key, see these instructions.

Documentation

Back to software page.

NOTE: This module has become part of The Grizzled Utility API. (See the grizzled.os module.) This stand-alone version is no longer maintained.

Introduction

The daemon module provides a function that will convert the calling process to a daemon. To make the current Python process into a daemon process, you need two lines of code:

import daemon
daemon.daemonize()

If daemonize() fails for any reason, it throws an exception. It also logs debug messages, using the standard Python logging package, to channel "daemon".

Adapted from the C daemonize tool.

Installation

The usual:

  1. Unpack the tarball or Zip file.
  2. Change your directory to the resulting daemon-1.0.1 directory.
  3. Run: python setup.py install
This module is also available on PyPI. If you have Easy Install installed, you can install this package with one command (usually as root):
easy_install daemon

Author

Brian M. Clapper, <bmc @ clapper . org>

Copyright

© 2008 Brian M. Clapper

License

BSD-style license. See accompanying LICENSE file.

$Id: index.html,v 1.7 2005/05/20 14:37:58 bmc Exp $