renamed config options to a much more descriptive name
use `unlink()` instead of `remove()`

`remove()` will do a rmdir if necessary - we don't want that. So we use `unlink()`
`log_crit()` is more appropriate
reopening stdin and stdout to /dev/null now

stdin, stdout and stderr should always be valid file handles. Thus we
don't close them but reopen them to /dev/null
use a second fork to avoid a terminal

after the setsid() we are the process leader. And as a process leader we
are able to open a new terminal, even if we currently don't own one. So
we do another fork and do not call setsid() and not become a process
leader to avoid that.
we now use a function and are more sophisticated

Refactoring part: we now use a function to generate the PID
file. Sophistication: we now check if the PID contained in the file is a
valid PID. We ignore the file if it doesn't.
refactoring: daemonizing is now a function