Sometimes we need no-fork mode for main process. For example to control opensips with daemon-tools or old buggy upstart.
This patch adds -F command-line option for daemon mode with foreground main process.
Looking at the patch, things seem ok, except for the fact that the naming seems a little confusing.
I see that you introduce a new var, daemon_mode, and when it's set to 0, it will trigger forking & daemonizing.
Am I missing something, or should we invert the daemon_mode meaning ?
We can rename it to no_daemon_mode :-)
Yep, sounds about right :)
Changed and committed on trunk. Thanks for the patch.