summaryrefslogtreecommitdiffstats
path: root/win32.c
diff options
context:
space:
mode:
authorJames Yonan <james@openvpn.net>2010-07-16 18:01:11 +0000
committerJames Yonan <james@openvpn.net>2010-07-16 18:01:11 +0000
commitb90c6f17b476b0ef1bd831f4a475425c94ba237f (patch)
treeba7a9f24437743b1c07ba8d396e0fbafadcc0762 /win32.c
parentf9b2ada0eece06158cc3ce6f6348bd431dfd7f0a (diff)
downloadopenvpn-b90c6f17b476b0ef1bd831f4a475425c94ba237f.tar.gz
openvpn-b90c6f17b476b0ef1bd831f4a475425c94ba237f.tar.xz
openvpn-b90c6f17b476b0ef1bd831f4a475425c94ba237f.zip
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
Diffstat (limited to 'win32.c')
-rw-r--r--win32.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/win32.c b/win32.c
index 8fa898f..2a3350d 100644
--- a/win32.c
+++ b/win32.c
@@ -971,10 +971,8 @@ openvpn_execve (const struct argv *a, const struct env_set *es, const unsigned i
/* fill in STARTUPINFO struct */
GetStartupInfo(&start_info);
start_info.cb = sizeof(start_info);
- start_info.dwFlags = STARTF_USESTDHANDLES|STARTF_USESHOWWINDOW;
+ start_info.dwFlags = STARTF_USESHOWWINDOW;
start_info.wShowWindow = SW_HIDE;
- start_info.hStdInput = GetStdHandle(STD_INPUT_HANDLE);
- start_info.hStdOutput = start_info.hStdError = GetStdHandle(STD_OUTPUT_HANDLE);
if (CreateProcess (cmd, cl, NULL, NULL, FALSE, 0, env, NULL, &start_info, &proc_info))
{
@@ -1042,10 +1040,8 @@ fork_to_self (const char *cmdline)
/* fill in STARTUPINFO struct */
GetStartupInfo(&start_info);
start_info.cb = sizeof(start_info);
- start_info.dwFlags = STARTF_USESTDHANDLES|STARTF_USESHOWWINDOW;
+ start_info.dwFlags = STARTF_USESHOWWINDOW;
start_info.wShowWindow = SW_HIDE;
- start_info.hStdInput = GetStdHandle(STD_INPUT_HANDLE);
- start_info.hStdOutput = start_info.hStdError = GetStdHandle(STD_OUTPUT_HANDLE);
if (CreateProcess (self_exe, cl, NULL, NULL, FALSE, 0, NULL, NULL, &start_info, &proc_info))
{