Skip to content

Commit

Permalink
fix deadlock if logfile is not writeable on startup
Browse files Browse the repository at this point in the history
  • Loading branch information
sni committed Mar 1, 2023
1 parent 2810442 commit 3c7833b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions neb_module_naemon/mod_gearman.c
Expand Up @@ -1163,7 +1163,9 @@ void init_logging(mod_gm_opt_t *opt) {
if(opt->logmode == GM_LOG_MODE_FILE && opt->logfile && opt->debug_level < GM_LOG_STDOUT) {
opt->logfile_fp = fopen(opt->logfile, "a+");
if(opt->logfile_fp == NULL) {
opt->logmode = GM_LOG_MODE_CORE;
gm_log( GM_LOG_ERROR, "error opening logfile: %s\n", opt->logfile );
opt->logmode = GM_LOG_MODE_FILE;
}
}
if ( opt->logmode == GM_LOG_MODE_AUTO ) {
Expand Down

0 comments on commit 3c7833b

Please sign in to comment.