Jan
14
2008
Linux Daemon Howto
Posted by: seba in C, Firefox, Linux, Programming, tags: C, Linux, ProgrammingWhat 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):
- use the function daemon, see the manpage daemon(3) for details;
- develop a function that daemonize your personal program.

Entries (RSS)