daemonize
— Daemonize Current Process (Unix only)#
Module to daemonize the current process on Unix.
- daemonize.daemonize(close_fd=True, chdir=True, redirect_std=None)[source]#
Daemonize the current process.
Only works on POSIX compatible operating systems. The process will fork to the background and return control to terminal.
- Parameters:
close_fd (bool) – Close the standard streams and replace them by /dev/null
chdir (bool) – Change the current working directory to /
redirect_std (Optional[str]) – Filename to redirect stdout and stdin to
- Return type:
None