diff options
Diffstat (limited to 'source3/lib/debug.c')
-rw-r--r-- | source3/lib/debug.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source3/lib/debug.c b/source3/lib/debug.c index f41c3b64976..842d2dac1d6 100644 --- a/source3/lib/debug.c +++ b/source3/lib/debug.c @@ -423,7 +423,7 @@ BOOL debug_parse_levels(const char *params_str) if (AllowDebugChange == False) return True; - params = str_list_make(params_str); + params = str_list_make(params_str, NULL); if (debug_parse_params(params, DEBUGLEVEL_CLASS, DEBUGLEVEL_CLASS_ISSET)) @@ -602,6 +602,12 @@ BOOL reopen_logs( void ) force_check_log_size(); (void)umask(oldumask); + /* Take over stderr to catch ouput into logs */ + if (dbf && sys_dup2(dbf->fd, 2) == -1) { + close_low_fds(True); /* Close stderr too, if dup2 can't point it + at the logfile */ + } + return ret; } |