summaryrefslogtreecommitdiff
path: root/source3/lib/debug.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-11-01 03:58:14 +0100
committerJelmer Vernooij <jelmer@samba.org>2008-11-01 03:58:14 +0100
commit5a56c0adf2c63602b819d052644cb14caf732438 (patch)
tree37c6725a0ed7cfcf9708de335e21b52fc2a46c20 /source3/lib/debug.c
parentdf766a303a9114969caa7c51e5e0e29d8e0e3850 (diff)
downloadsamba-5a56c0adf2c63602b819d052644cb14caf732438.tar.gz
samba-5a56c0adf2c63602b819d052644cb14caf732438.tar.bz2
samba-5a56c0adf2c63602b819d052644cb14caf732438.zip
Use dup2() replacement from libreplace.
Diffstat (limited to 'source3/lib/debug.c')
-rw-r--r--source3/lib/debug.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/lib/debug.c b/source3/lib/debug.c
index be2707b595..986dff48d7 100644
--- a/source3/lib/debug.c
+++ b/source3/lib/debug.c
@@ -680,8 +680,8 @@ bool reopen_logs( void )
force_check_log_size();
(void)umask(oldumask);
- /* Take over stderr to catch ouput into logs */
- if (dbf && sys_dup2(x_fileno(dbf), 2) == -1) {
+ /* Take over stderr to catch output into logs */
+ if (dbf && dup2(x_fileno(dbf), 2) == -1) {
close_low_fds(True); /* Close stderr too, if dup2 can't point it
at the logfile */
}