Move all configuration-file code outside of the initialization loop and into its own set of functions. Create a readconfigfile() to open the config and call parseconfigfile() to parse it. The init() function no longer returns if there was a failure to open the configuration file. Initialization will be finished, using the backup logging rules: *.ERR to /dev/console and *.PANIC to all logged in users.
Details
Details
- Reviewers
markj emaste - Commits
- rG931d05fc088b: syslogd: Read configuration outside of init loop
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
usr.sbin/syslogd/syslogd.c | ||
---|---|---|
2468 |
Ah, I ended up removing the allow_includes parameter later because of this unintentional flip. I don't see why recursive includes would be an issue, unless you had an inclusion loop. Maybe this is there to mitigate that? | |
2662 |
Yeah, I went through the logic when I made this change. There shouldn't be an error in removing the early return. |
usr.sbin/syslogd/syslogd.c | ||
---|---|---|
2549 | I would drop this comment too, in the spirit of "comments should explain why, not what." |