APLawrence.com -  Resources for Unix and Linux Systems, Bloggers and the self-employed

2005/01/19 daemon

© January 2005 Tony Lawrence


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.

Got something to add? Send me email.

(OLDER)    <- More Stuff -> (NEWER)    (NEWEST)   

Printer Friendly Version

-> 2005/01/19 daemon

Inexpensive and informative Apple related e-books:

iOS 10: A Take Control Crash Course

Sierra: A Take Control Crash Course

Take Control of OS X Server

Take Control of IOS 11

Take Control of Pages

More Articles by © Tony Lawrence

Printer Friendly Version

Have you tried Searching this site?

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.

Contact us

Printer Friendly Version

The best of us would rather be popular than right. (Mark Twain)

Linux posts

Troubleshooting posts

This post tagged:


Unix/Linux Consultants

Skills Tests

Unix/Linux Book Reviews

My Unix/Linux Troubleshooting Book

This site runs on Linode

SCO Unix Sales, Support, & Service

Phone:  707-SCO-UNIX (707-726-8649Toll Free: 833-SCO-UNIX (833-726-8649)