mirror of
https://gitlab.com/fbb-git/cppannotations
synced 2024-11-18 10:06:54 +01:00
6881bc3814
Annotations. The branches and tags directory are empty, since I couldn't svnadmin import a repostitory dump. Many earlier versions exist, though, and if you want the full archive, just let me know and I'll send you the svnadmin dump of my full C++ Annotations archive. Frank B. Brokken <f.b.brokken@rug.nl> git-svn-id: https://cppannotations.svn.sourceforge.net/svnroot/cppannotations/trunk@3 f6dd340e-d3f9-0310-b409-bdd246841980
14 lines
953 B
Text
14 lines
953 B
Text
Applications exist in which the only purpose of ti(fork()) is to start a
|
|
child process. The parent process terminates immediately after spawning the
|
|
child process. If this happens, the child process continues to run as a child
|
|
process of ti(init), the always running first process on i(Unix) systems. Such
|
|
a process is often called a emi(daemon), running as a i(background process).
|
|
|
|
Although the following example can easily be constructed as a plain bf(C)
|
|
program, it was included in the bf(C++) Annotations because it is so closely
|
|
related to the current discussion of the tt(Fork) class. I thought about
|
|
adding a tt(daemon()) member to that class, but eventually decided against it
|
|
because the construction of a daemon program is very simple and requires no
|
|
features other than those currently offered by the class tt(Fork). Here is an
|
|
example illustrating the construction of a daemon program:
|
|
verbinclude(concrete/examples/daemon.cc)
|