From b90c6f17b476b0ef1bd831f4a475425c94ba237f Mon Sep 17 00:00:00 2001 From: James Yonan Date: Fri, 16 Jul 2010 18:01:11 +0000 Subject: Added --register-dns option for Windows. Fixed some issues on Windows with --log, subprocess creation for command execution, and stdout/stderr redirection. Version 2.1.1m. git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@6304 e7ae566f-a301-0410-adde-c780ea21d3b5 --- error.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'error.c') diff --git a/error.c b/error.c index ce61f6c..ec8f9df 100644 --- a/error.c +++ b/error.c @@ -521,6 +521,10 @@ redirect_stdout_stderr (const char *file, bool append) if (msgfp == NULL) msg (M_ERR, "Error: --log redirect failed due to _fdopen"); + /* redirect C-library stdout/stderr to log file */ + if (_dup2 (log_fd, 1) == -1 || _dup2 (log_fd, 2) == -1) + msg (M_WARN, "Error: --log redirect of stdout/stderr failed"); + std_redir = true; } #elif defined(HAVE_DUP2) -- cgit v1.2.3