(Debian):
http://packages.debian.org/unstable/utils/daemon
http://libslack.org/daemon/manpages/daemon.1.html
apt-get install -t unstable daemon
It's not a lot of fun to program everything that really needs to be done for a proper daemon process. Some things you might not think of including moving to the root directory or somewhere else that you can be sure will never need to be deleted or unmounted, prohibiting core files,making sure any unexpected output goes either someplace reasonable or to /dev/null, disassociating from the terminal it started from, clearing umask and more. The "daemon" program takes care of these little details for you, freeing you to screw up your code in more interesting places.
With the "--respawn" option, daemon keeps your process running, but is smart enough not to keep respawning something that's dying too quickly (300 seconds by default but you can specify that too). Lots of other useful options for your convenience.
Enter your email address for automatic notification of new posts here
(be sure to whitelist 'feedburner.com' if you use spam filtering)
| Views for this page | ||||
|---|---|---|---|---|
| Today | This Week | This Month | This Year | Overall |
| 2 | 2 | 3 | 239 | 382 |
Have you tried Searching this site?
Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates
This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.
Add your comments
Control Spam and Viruses
Run your own mailserver