Closed nachtgeist closed 7 years ago
@reubenhwk thinking about it more, yes, if we are daemonizing, I can't think of any useful reason to keep stdin/stdout/stderr open.
I changed the code to close stderr and stdout regardless when daemonizing. Please checkout the code on master and let me know if that's working for you. If so, I'll cut a 2.17.
Yup, that's a cleaner way to go. Tested via ssh, which now exits as expected, after radvd has daemonized.
Thanks!
The default behavior is to daemonize, however the default log level is L_STDERR_SYSLOG which leaves STDERR bleeding into the console. Thus, change the default log method to L_SYSLOG (which fits daemonizing) and automatically change it to L_STDERR_SYSLOG if --nodaemon was specified on the command-line. However, the latter only takes effect, if the log method wasn't specified explicitly.
Fixes #71.