Quick and dirty pseudo daemons
Any program can be run in the background, even if it's not meant to be a daemon per se, by starting screen
in detached mode with -m -d
. Give it a unique session name, for easy reattaching with -S <name>
.
screen -S foo -m -d program
If your "daemon" consists of some shell-fu, you will need to start a shell process with the -c
argument.
screen -m -d zsh -c 'while true; do beep; sleep 1; done'
Written by Kaito Michishige
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Daemon
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#