Posts Tagged “C”

What is a daemon:

in Unix and other multitasking operative systems, a daemon is a computer programs that runs in the background; they run without the direct control of a user.

In linux, or in any generic unix-like operating system, a daemon is usually initiated as process and its "parent process" is the init process. The usual way that allow to process to became a daemon is to create a child process, with the function fork, and then to force the exit of parent process, thus the init process will adopt the child process.

In linux there are wo ways " to daemonize" a program (or process):

  1. use the function daemon, see the manpage daemon(3) for details;
  2. develop a function that daemonize your personal program.

Read the rest of this entry »

Comments 1 Comment »