1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-09 08:58:35 +03:00

Fix bug 5805: don't close stdout

- When calling setup_logging multiple times, the code was closing the debug
  file descriptor before opening or assigning the new one.  We don't, however,
  want to close the debug file descriptor if it is stdout.

Derrell
This commit is contained in:
Derrell Lipman 2008-10-02 09:03:32 -04:00
parent 3c9f3c32d1
commit f0c1749636

View File

@ -578,7 +578,9 @@ void setup_logging(const char *pname, bool interactive)
stdout_logging = False;
if (dbf) {
x_fflush(dbf);
(void) x_fclose(dbf);
if (dbf != x_stdout) {
(void) x_fclose(dbf);
}
}
dbf = NULL;