Skip to content
Snippets Groups Projects
Commit 04b376ef authored by Mark Grondona's avatar Mark Grondona
Browse files

o split log_init() in slurmd_job_log_init() into a log_alter() and

  log_set_argv0() to avoid reinitializing the log mutex.
  This avoids spurious debug messages on job stderr when default stderr
  logging is high (a rare but annoying bug)
parent 7b3da64a
No related branches found
No related tags found
No related merge requests found
...@@ -1053,21 +1053,22 @@ _slurmd_job_log_init(slurmd_job_t *job) ...@@ -1053,21 +1053,22 @@ _slurmd_job_log_init(slurmd_job_t *job)
*/ */
conf->log_opts.stderr_level = LOG_LEVEL_ERROR + job->debug; conf->log_opts.stderr_level = LOG_LEVEL_ERROR + job->debug;
snprintf(argv0, sizeof(argv0), "slurmd[%s]", conf->hostname);
/*
* reinitialize log
*/
log_alter(conf->log_opts, 0, NULL);
log_set_argv0(argv0);
/* Connect slurmd stderr to job's stderr */ /* Connect slurmd stderr to job's stderr */
if (dup2(job->task[0]->perr[1], STDERR_FILENO) < 0) { if (dup2(job->task[0]->perr[1], STDERR_FILENO) < 0) {
error("job_log_init: dup2(stderr): %m"); error("job_log_init: dup2(stderr): %m");
return; return;
} }
}
fd_set_nonblocking(STDERR_FILENO);
snprintf(argv0, sizeof(argv0), "slurmd[%s]", conf->hostname);
/*
* reinitialize log
*/
log_init(argv0, conf->log_opts, 0, NULL);
}
/* /*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment