diff options
author | Omar Polo <op@omarpolo.com> | 2023-06-09 17:24:37 +0000 |
---|---|---|
committer | Omar Polo <op@omarpolo.com> | 2023-06-09 17:24:37 +0000 |
commit | 68368f4c29e208c67724b04fd0142e233a247a2a (patch) | |
tree | 2a4c6596dbd28f3f726d467e4222f677dae5cf18 /parse.y | |
parent | af1dab18702cf135aa80bf15065f73050c915347 (diff) |
parse_conf: don't die on error, return -1
this avoids having the daemon dieing on SIGHUP with a bad config
file.
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -908,7 +908,7 @@ popfile(void) return file ? 0 : EOF; } -void +int parse_conf(struct conf *c, const char *filename) { struct sym *sym, *next; @@ -917,7 +917,7 @@ parse_conf(struct conf *c, const char *filename) file = pushfile(filename, 0); if (file == NULL) - exit(1); + return -1; topfile = file; yyparse(); @@ -936,7 +936,8 @@ parse_conf(struct conf *c, const char *filename) } if (errors) - exit(1); + return -1; + return 0; } void |