Skip to content
This repository was archived by the owner on Aug 8, 2025. It is now read-only.

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Daemonic

Context manager to eliminate daemonizing boilerplate code.

Installation

Install with pip install daemonic.

Use

Daemonic is pretty easy to use as a context manager:

with daemonic.daemon(
        pidfile='/var/run/mydaemon.pid',
        stdout=open('/var/log/mydaemon.log', 'a')):
    # your daemon code here

daemonic takes care of:

  • Forking twice to detach from the current terminal/process
  • Changing to a different working directory
  • Managing user file creation permissions (umask)
  • Redirecting standard input/output/error
  • Creating a locked PID file

License

MIT license.

About

Python package for UNIX/Linux daemon boilerplate

Topics

Resources

Stars

7 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages