-   Linux - Newbie (
-   -   newbie: Reason for daemon (

jCash 12-15-2007 07:57 AM

newbie: Reason for daemon
Why would you want to have a program as a daemon, so you can start and stop it, without having to try to find the pid and killing the program?

I have a program that need to be started by cron and I am not sure if I have to make it a daemon.

kzutter 12-15-2007 09:19 AM

Sometimes it is desirable to have program run continuously in the background. This is daemon mode. Most daemons sit quietly, waiting for some kind of event, such as a network request.

bsdunix 12-15-2007 09:44 AM

Any process running in the background or foreground has a PID whether that process is short or long lived.

A "daemon" is just a name associated with service programs that run in the background that typically perform a function (DNS, DHCP, HTTP, etc.)

CRON can start service programs as well as the typical timed event short lived script task.

So, if your program will perform a service and will need to stay long lived, then consider it a daemon. If on the other hand it will perform a short lived process, then it's a task.

Daemon (computer software)

All times are GMT -5. The time now is 10:04 AM.