All Projects → thesharp → Daemonize

thesharp / Daemonize

Licence: mit
daemonize is a library for writing system daemons in Python.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Daemonize

InitKit
Neo-InitWare is a modular, cross-platform reimplementation of the systemd init system. It is experimental.
Stars: ✭ 364 (-8.08%)
Mutual labels:  freebsd, system, openbsd, netbsd
osutil
Go library to easily detect current operating system, current Linux distribution, macOS version and more...
Stars: ✭ 22 (-94.44%)
Mutual labels:  freebsd, system, openbsd, netbsd
psutil
Cross-platform lib for process and system monitoring in Python
Stars: ✭ 8,488 (+2043.43%)
Mutual labels:  freebsd, openbsd, osx, netbsd
Ecominit
eComInit is a free init system and service manager designed to scale from lightweight desktops to web-scale cloud deployments. It aims to offer feature-parity with systemd but with a modular, portable architecture compliant with software engineering best-practice.
Stars: ✭ 352 (-11.11%)
Mutual labels:  freebsd, openbsd, netbsd, system
Qtfm
Qt File Manager
Stars: ✭ 73 (-81.57%)
Mutual labels:  freebsd, openbsd, netbsd
gsmartcontrol
GSmartControl - Hard disk drive and SSD health inspection tool
Stars: ✭ 183 (-53.79%)
Mutual labels:  freebsd, openbsd, netbsd
Awesome-BSD-Ports-Programs-And-Projects
A Repo Detailing BSD Ports, Programs, and Projects.
Stars: ✭ 46 (-88.38%)
Mutual labels:  freebsd, openbsd, netbsd
packetdrill
packetdrill with UDPLite and SCTP support and bug fixes for FreeBSD
Stars: ✭ 37 (-90.66%)
Mutual labels:  freebsd, openbsd, netbsd
Ruby Vmstat
A focused and fast library to gather memory, cpu, network, load avg and disk information
Stars: ✭ 68 (-82.83%)
Mutual labels:  freebsd, openbsd, netbsd
Fisy Fuzz
This is the full file system fuzzing framework that I presented at the Hack in the Box 2020 Lockdown Edition conference in April.
Stars: ✭ 110 (-72.22%)
Mutual labels:  freebsd, openbsd, netbsd
uac
UAC is a Live Response collection script for Incident Response that makes use of native binaries and tools to automate the collection of AIX, Android, ESXi, FreeBSD, Linux, macOS, NetBSD, NetScaler, OpenBSD and Solaris systems artifacts.
Stars: ✭ 260 (-34.34%)
Mutual labels:  freebsd, openbsd, netbsd
Libtuntap
The portable Tun/Tap devices configuration utility
Stars: ✭ 107 (-72.98%)
Mutual labels:  freebsd, openbsd, netbsd
Postinstall
💻 Bash Script to automate post-installation steps
Stars: ✭ 104 (-73.74%)
Mutual labels:  freebsd, openbsd, netbsd
Daemonize
Library for writing system daemons
Stars: ✭ 210 (-46.97%)
Mutual labels:  daemon, osx, system
Awesome Bsd
A collection of awesome BSD related stuff
Stars: ✭ 236 (-40.4%)
Mutual labels:  freebsd, openbsd, netbsd
InitWare
The InitWare Suite of Middleware allows you to manage services and system resources as logical entities called units. Its main component is a service management ("init") system.
Stars: ✭ 164 (-58.59%)
Mutual labels:  freebsd, system, openbsd
Mg
Micro (GNU) Emacs-like text editor ❤️ public-domain
Stars: ✭ 117 (-70.45%)
Mutual labels:  freebsd, openbsd, netbsd
Htop
htop is an interactive text-mode process viewer for Unix systems. It aims to be a better 'top'.
Stars: ✭ 5,626 (+1320.71%)
Mutual labels:  freebsd, openbsd, system
Awesome Unix
All the UNIX and UNIX-Like: Linux, BSD, macOS, Illumos, 9front, and more.
Stars: ✭ 973 (+145.71%)
Mutual labels:  freebsd, openbsd, netbsd
Objfw
[Official Mirror] A portable framework for the Objective-C language.
Stars: ✭ 161 (-59.34%)
Mutual labels:  freebsd, openbsd, netbsd

daemonize

.. image:: https://readthedocs.org/projects/daemonize/badge/?version=latest :target: http://daemonize.readthedocs.org/en/latest/?badge=latest :alt: Latest version

.. image:: https://img.shields.io/travis/thesharp/daemonize.svg :target: http://travis-ci.org/thesharp/daemonize :alt: Travis CI

.. image:: https://img.shields.io/pypi/dm/daemonize.svg :target: https://pypi.python.org/pypi/daemonize :alt: PyPI montly downloads

.. image:: https://img.shields.io/pypi/v/daemonize.svg :target: https://pypi.python.org/pypi/daemonize :alt: PyPI last version available

.. image:: https://img.shields.io/pypi/l/daemonize.svg :target: https://pypi.python.org/pypi/daemonize :alt: PyPI license

daemonize is a library for writing system daemons in Python. It is distributed under MIT license. Latest version can be downloaded from PyPI <https://pypi.python.org/pypi/daemonize>. Full documentation can be found at ReadTheDocs <http://daemonize.readthedocs.org/en/latest/?badge=latest>.

Dependencies

It is tested under following Python versions:

  • 2.6
  • 2.7
  • 3.3
  • 3.4
  • 3.5

Installation

You can install it from Python Package Index (PyPI):

::

$ pip install daemonize

Usage

.. code-block:: python

from time import sleep
from daemonize import Daemonize

pid = "/tmp/test.pid"


def main():
    while True:
        sleep(5)

daemon = Daemonize(app="test_app", pid=pid, action=main)
daemon.start()

File descriptors

Daemonize object's constructor understands the optional argument keep_fds which contains a list of FDs which should not be closed. For example:

.. code-block:: python

import logging
from daemonize import Daemonize

pid = "/tmp/test.pid"
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
logger.propagate = False
fh = logging.FileHandler("/tmp/test.log", "w")
fh.setLevel(logging.DEBUG)
logger.addHandler(fh)
keep_fds = [fh.stream.fileno()]


def main():
    logger.debug("Test")

daemon = Daemonize(app="test_app", pid=pid, action=main, keep_fds=keep_fds)
daemon.start()
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].