forked from jirihnidek/daemon
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jiri Hnidek
committed
Mar 2, 2015
1 parent
c33f4fd
commit a6a259e
Showing
1 changed file
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,44 @@ | ||
# Example of Linux Daemon | ||
|
||
This repository contains simple example of daemon for Linux OS. | ||
This repository also contains examples of starting scripts. | ||
|
||
## Requirements | ||
|
||
To build example of the daemon you have to have following tools | ||
|
||
* CMake | ||
* GCC/CLang | ||
|
||
## Build | ||
|
||
To build example of daemon you have to type following commands: | ||
|
||
git clone https://github.com/jirihnidek/daemon.git | ||
cd daemon | ||
mkdir build | ||
cd build | ||
cmake ../ | ||
make | ||
|
||
## Usage | ||
|
||
You can test running daemon from command line: | ||
|
||
./bin/daemon | ||
|
||
But running the app in this way is not running running daemon. Let | ||
have a look at command line parameters and arguments | ||
|
||
Usage: ./bin/daemon [OPTIONS] | ||
|
||
Options: | ||
-h --help Print this help | ||
-c --conf_file filename Read configuration from the file | ||
-t --test_conf filename Test configuration file | ||
-l --log_file filename Write logs to the file | ||
-d --daemon Daemonize this application | ||
-p --pid_file filename PID file used by daemonized app | ||
|
||
When you will run `./bin/daemon` with parameter `--daemon` or `-d`, then | ||
it will become real UNIX daemon. |